Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9805cdc94 | ||
|
|
feb36d43a4 | ||
|
|
92c88d7c13 | ||
|
|
033fc4f480 | ||
|
|
4ca9670e4e | ||
|
|
8fee66c0fa | ||
|
|
9a3b5d7a2c | ||
|
|
f166431b02 | ||
|
|
088fdc6171 | ||
|
|
910c77fd39 | ||
|
|
dacf2875b7 | ||
|
|
cbcc79972a | ||
|
|
0faddf1df6 | ||
|
|
697c8b8e7a | ||
|
|
99403b8246 | ||
|
|
4b7e1003e0 | ||
|
|
5fd6d39aed | ||
|
|
cedb1afe6f | ||
|
|
4bff8e5158 | ||
|
|
474aedde34 | ||
|
|
a8d7566186 | ||
|
|
beb7b54e4a | ||
|
|
d08cc74aad | ||
|
|
27e4279c55 | ||
|
|
6cd2f3b386 | ||
|
|
472c971c5b | ||
|
|
d8756455c2 | ||
|
|
5aae48cc28 | ||
|
|
4ab3b55383 | ||
|
|
6ea6b90e03 | ||
|
|
eb5c888cb8 | ||
|
|
cda07dfa0b | ||
|
|
4abae3200b | ||
|
|
b60895beb4 | ||
|
|
855d70a3b3 | ||
|
|
583d9bfe36 | ||
|
|
d519611a25 | ||
|
|
9a9bace8e8 | ||
|
|
40810f2fdb | ||
|
|
361a77580e | ||
|
|
ea45c7e689 | ||
|
|
cc1d51a6ca | ||
|
|
b8233fb7b8 | ||
|
|
5cbe80066d | ||
|
|
3f6c10256c | ||
|
|
609b2830b0 | ||
|
|
b7bbd2d615 | ||
|
|
41d6429782 | ||
|
|
ae168a00a9 | ||
|
|
79694d8a95 | ||
|
|
95be64cbd7 | ||
|
|
76bf7a0079 | ||
|
|
142390f27d | ||
|
|
d0145ce58c | ||
|
|
9217f83870 | ||
|
|
cf261724c3 | ||
|
|
375afb5dff | ||
|
|
9e5779644c | ||
|
|
a6a92837e4 | ||
|
|
d84f40dd77 | ||
|
|
5183c28d5e | ||
|
|
5ed3ea51d3 | ||
|
|
39d76c969d | ||
|
|
5cf4c4edbe | ||
|
|
f6c376a3e7 | ||
|
|
d9a2265b0f | ||
|
|
0c1b1c48f2 | ||
|
|
7c24998e28 | ||
|
|
bf442a4bd4 | ||
|
|
40f432badb | ||
|
|
15a8681ba0 | ||
|
|
61ed6e97f4 | ||
|
|
eee4bf51d6 | ||
|
|
b9cbb9e2e8 | ||
|
|
ed426108f2 | ||
|
|
c168615305 | ||
|
|
680ae0222a | ||
|
|
dc3d34e4df | ||
|
|
d356fa4da6 | ||
|
|
90eafdd820 | ||
|
|
263fca2510 | ||
|
|
04dcb490c3 | ||
|
|
e8a96523b7 | ||
|
|
226886acf7 | ||
|
|
b544f24bcf | ||
|
|
f7ad6e09ed | ||
|
|
1d8abf1110 | ||
|
|
fee281fcb4 | ||
|
|
1facb7dd71 | ||
|
|
a96d7c789e | ||
|
|
cc4e4b236d | ||
|
|
932efb6ef5 | ||
|
|
bf6c23eb86 | ||
|
|
df1754eb2a | ||
|
|
1ce1f0a981 | ||
|
|
29537ea283 | ||
|
|
0b45618c5f | ||
|
|
48079d6f1a | ||
|
|
1531ac847c | ||
|
|
66f569e214 | ||
|
|
db71aeea41 | ||
|
|
1c8e0babac | ||
|
|
416ac1a619 | ||
|
|
ab805808c5 | ||
|
|
cf577a29da | ||
|
|
94d2fd0147 | ||
|
|
e745d802df | ||
|
|
cd1dca9bfa | ||
|
|
b0ec03bdd5 | ||
|
|
becccf6323 | ||
|
|
10cb508783 | ||
|
|
cf9d2d6049 | ||
|
|
3e490736fd | ||
|
|
95e7edd48f | ||
|
|
6f8ca717c8 | ||
|
|
f480cdc1ca | ||
|
|
beca267b66 | ||
|
|
f270fe693b | ||
|
|
a7f96a19ca | ||
|
|
e759d32bcf | ||
|
|
7ee4f7aaf8 | ||
|
|
dd6826fadd | ||
|
|
abc68bf2e2 | ||
|
|
ccab89304b | ||
|
|
044465eee4 | ||
|
|
42af205546 | ||
|
|
545ad50097 | ||
|
|
6f19084a4d | ||
|
|
4688291ecf | ||
|
|
da1cf9d64e | ||
|
|
96a3ef51f0 | ||
|
|
2eb453c4ce | ||
|
|
12bf338e40 | ||
|
|
923f569d77 |
+2
-1
@@ -6,7 +6,8 @@ const base = require('@polkadot/dev/config/eslint.cjs');
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
...base,
|
...base,
|
||||||
ignorePatterns: [
|
ignorePatterns: [
|
||||||
...base.ignorePatterns
|
...base.ignorePatterns,
|
||||||
|
'/scripts'
|
||||||
],
|
],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
...base.parserOptions,
|
...base.parserOptions,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ jobs:
|
|||||||
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
|
||||||
steps:
|
steps:
|
||||||
- uses: jacogr/action-approve@9d6ce78d26f23ad29d009d034822cf773f2cb50e
|
- uses: jacogr/action-approve@795afd1dd096a2071d7ec98740661af4e853b7da
|
||||||
with:
|
with:
|
||||||
authors: jacogr
|
authors: jacogr
|
||||||
labels: -auto
|
labels: -auto
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ jobs:
|
|||||||
merge:
|
merge:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: jacogr/action-merge@3b4b49af8a8644bf5cbb5409ee236abe04eeb1b0
|
- uses: jacogr/action-merge@d2d64b4545acd93b0a9575177d3d215ae3f92029
|
||||||
with:
|
with:
|
||||||
checks: build,lint,test
|
checks: pr (build),pr (lint),pr (test)
|
||||||
labels: -auto
|
labels: -auto
|
||||||
strategy: squash
|
strategy: squash
|
||||||
token: ${{ secrets.GH_PAT_BOT }}
|
token: ${{ secrets.GH_PAT_BOT }}
|
||||||
|
|||||||
@@ -3,16 +3,19 @@ on: [pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pr:
|
pr:
|
||||||
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
step: ['lint', 'test', 'build', 'deno']
|
step: ['lint', 'test', 'build', 'deno']
|
||||||
name: ${{ matrix.step }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
YARN_ENABLE_SCRIPTS: false
|
YARN_ENABLE_SCRIPTS: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
- uses: actions/checkout@v3
|
||||||
- uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 'lts/*'
|
||||||
|
- uses: denoland/setup-deno@v1
|
||||||
with:
|
with:
|
||||||
deno-version: vx.x.x
|
deno-version: vx.x.x
|
||||||
- name: ${{ matrix.step }}
|
- name: ${{ matrix.step }}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
step: ['build:release']
|
step: ['build:release']
|
||||||
name: ${{ matrix.step }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
YARN_ENABLE_SCRIPTS: false
|
YARN_ENABLE_SCRIPTS: false
|
||||||
@@ -19,10 +18,13 @@ jobs:
|
|||||||
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT_BOT }}
|
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT_BOT }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GH_PAT_BOT }}
|
token: ${{ secrets.GH_PAT_BOT }}
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 'lts/*'
|
||||||
- name: ${{ matrix.step }}
|
- name: ${{ matrix.step }}
|
||||||
run: |
|
run: |
|
||||||
yarn install --immutable | grep -v 'YN0013'
|
yarn install --immutable | grep -v 'YN0013'
|
||||||
|
|||||||
+102
@@ -1,5 +1,107 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 10.0.1 Mar 4, 2023
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Expose per-endpoint stats for providers (Thanks to https://github.com/jeluard)
|
||||||
|
- Adjust ink! primitive extraction for v4 (Thanks to https://github.com/statictype)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Ensure that provider disconnect clears all subscriptions
|
||||||
|
- Adjust typegen to internally use `import()` (catering for ESM provided types)
|
||||||
|
- Swap TS -> JS compiler to use tsc (from babel)
|
||||||
|
- Adjust all tests to use `node:test` runner (ESM variants)
|
||||||
|
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 9.14.2 Feb 19, 2023
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Don't allow `WsProvider.connect()` on an open connection (creates resource leaks)
|
||||||
|
- Adjust typegen to use metadata-defined aliases in query return decoration
|
||||||
|
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 9.14.1 Feb 12, 2023
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Extract aliases for `*_runtime::Runtime{Call, Event}` from metadata
|
||||||
|
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 9.13.6 Feb 5, 2023
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Align `eth_getTransactionCount` with frontier (Thanks to https://github.com/alko89)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Additional override for `Compact<{ refTime: u64 }>` chains
|
||||||
|
- Add script to retrieve local rpc, version & metadata for typegen
|
||||||
|
|
||||||
|
|
||||||
|
## 9.13.5 Feb 2, 2023
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Adjust `Weight` alias for 1.5 chains
|
||||||
|
- Ensure correct registry is pass through for runtime TS generation
|
||||||
|
|
||||||
|
|
||||||
|
## 9.13.4 Feb 1, 2023
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- None from 9.13.3 (The previous version had npm registry publishing issues)
|
||||||
|
|
||||||
|
|
||||||
|
## 9.13.3 Feb 1, 2023
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Adjust `Weight` alias detection to cater for `WeightV0/u32` overrides (e.g. early Kusama blocks)
|
||||||
|
|
||||||
|
|
||||||
|
## 9.13.2 Jan 29, 2023
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Allow null as valid param to Int/UInt
|
||||||
|
|
||||||
|
|
||||||
|
## 9.13.1 Jan 29, 2023
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Add support for V3 of `TransactionPaymentApi` (Thanks to https://github.com/notlesh)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Adjust `Weight` alias detection (moved from `PortableRegistry` -> `Registry`)
|
||||||
|
- Move default (typegen) weight alias to `WeightV2` (does not affect runtime detection)
|
||||||
|
- Prepare metadata docs from chain generation for future cli arguments
|
||||||
|
- Add base type object for (future) composite types
|
||||||
|
- Apply additional JSDoc comments into `PortableRegistry`
|
||||||
|
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 9.12.1 Jan 22, 2023
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Add `isStorageFallback` on the `Codec` interface. (`true` if entry was created from a metadata fallback value from an empty storage item)
|
||||||
|
- Ensure `api.queryMulti` returns empty result when no keys are provided
|
||||||
|
- Add explicit Array checks on `Vec/Tuple` inputs
|
||||||
|
- Align `Struct.{toU8a/toPrimitive/toHuman/toJSON}` population of results
|
||||||
|
- Apply memoization to batched API queries
|
||||||
|
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||||
|
|
||||||
|
|
||||||
## 9.11.3 Jan 15, 2023
|
## 9.11.3 Jan 15, 2023
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|||||||
+5
-3
@@ -1,4 +1,4 @@
|
|||||||
3321 Jaco 9.11.3 (#5418)
|
3386 Jaco 10.0.1 (#5518)
|
||||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||||
37 Keith Ingram Update contract types and rpc (#4541)
|
37 Keith Ingram Update contract types and rpc (#4541)
|
||||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||||
@@ -10,16 +10,16 @@
|
|||||||
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
||||||
5 Chevdor Fix metadata package link (#3458)
|
5 Chevdor Fix metadata package link (#3458)
|
||||||
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
||||||
|
5 Julien Eluard General WsProvider extensibility improvements (#5467)
|
||||||
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
||||||
4 Alex Wang fix issue that creates duplicate providers (#983)
|
4 Alex Wang fix issue that creates duplicate providers (#983)
|
||||||
4 Alexander Popiak Add asset id in signing (#4009)
|
4 Alexander Popiak Add asset id in signing (#4009)
|
||||||
|
4 Andreea Eftene add type overrides (#5506)
|
||||||
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
||||||
4 Julien Eluard Clarified WsProvider constructor parameters documentation (#5404)
|
|
||||||
4 Nantian fix bigint type (#3869)
|
4 Nantian fix bigint type (#3869)
|
||||||
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
||||||
4 Thibaut Sardan no subscription for http (#3127)
|
4 Thibaut Sardan no subscription for http (#3127)
|
||||||
3 André Silva add support for ValidationCodeHash (#3640)
|
3 André Silva add support for ValidationCodeHash (#3640)
|
||||||
3 Andreea Eftene Fix code source type (#5236)
|
|
||||||
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
||||||
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
||||||
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
|
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
|
||||||
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
||||||
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
||||||
|
1 Aleš Ferlan fix: use H160 for address in getTransactionCount (#5472)
|
||||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||||
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
||||||
1 chriswmercer little readme tweak (#279)
|
1 chriswmercer little readme tweak (#279)
|
||||||
@@ -105,6 +106,7 @@
|
|||||||
1 serge make WS provider timeout configurable (#4758)
|
1 serge make WS provider timeout configurable (#4758)
|
||||||
1 Sergei Pepyakin INK! -> ink! (#1347)
|
1 Sergei Pepyakin INK! -> ink! (#1347)
|
||||||
1 Shunji Zhan small polish (#5276)
|
1 Shunji Zhan small polish (#5276)
|
||||||
|
1 Stephen Shelton Add transaction-payment runtime API V3 (#5430)
|
||||||
1 WoeOm adapt Darwinia, Crab Network types (#3498)
|
1 WoeOm adapt Darwinia, Crab Network types (#3498)
|
||||||
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
|
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
|
||||||
1 yjh fix MetadataVersioned.asV12 (#2983)
|
1 yjh fix MetadataVersioned.asV12 (#2983)
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
const config = require('@polkadot/dev/config/jest.cjs');
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
...config,
|
|
||||||
moduleNameMapper: {
|
|
||||||
'@polkadot/api-(augment|base|contract|derive)(.*)$': '<rootDir>/packages/api-$1/src/$2',
|
|
||||||
// eslint-disable-next-line sort-keys
|
|
||||||
'@polkadot/api(.*)$': '<rootDir>/packages/api/src/$1',
|
|
||||||
'@polkadot/rpc-(augment|core|provider)(.*)$': '<rootDir>/packages/rpc-$1/src/$2',
|
|
||||||
'@polkadot/typegen(.*)$': '<rootDir>/packages/typegen/src/$1',
|
|
||||||
'@polkadot/types-(augment|codec|create|known|support)(.*)$': '<rootDir>/packages/types-$1/src/$2',
|
|
||||||
// eslint-disable-next-line sort-keys
|
|
||||||
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
|
|
||||||
},
|
|
||||||
testTimeout: 30000
|
|
||||||
};
|
|
||||||
+16
-16
@@ -11,40 +11,40 @@
|
|||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.11.3",
|
"version": "10.0.1",
|
||||||
"versions": {
|
"versions": {
|
||||||
"git": "9.11.3",
|
"git": "10.0.1",
|
||||||
"npm": "9.11.3"
|
"npm": "10.0.1"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn build:interfaces && polkadot-dev-build-ts",
|
"build": "yarn build:interfaces && polkadot-dev-build-ts",
|
||||||
"build:extra": "(cd packages/typegen && copyfiles scripts/* build)",
|
"build:extra": "(cd packages/typegen && polkadot-dev-copy-dir scripts build/scripts)",
|
||||||
"build:interfaces": "polkadot-types-internal-interfaces",
|
"build:interfaces": "node --loader @polkadot/dev/node/ts packages/typegen/scripts/polkadot-types-internal-interfaces.mjs",
|
||||||
"build:metadata": "yarn build:interfaces && yarn test:one packages/types/src/metadata/v14",
|
"build:metadata": "yarn build:interfaces && polkadot-dev-run-test packages/types/src/metadata/v14",
|
||||||
"build:release": "polkadot-ci-ghact-build",
|
"build:release": "polkadot-ci-ghact-build",
|
||||||
"build:rollup": "polkadot-exec-rollup --config",
|
"build:rollup": "polkadot-exec-rollup --config",
|
||||||
"build:upgrades": "yarn test:one packages/types-known/src/upgrades/e2e",
|
"build:upgrades": "polkadot-dev-run-test upgrades/e2e",
|
||||||
"chain:info": "polkadot-types-chain-info",
|
"chain:info": "polkadot-types-chain-info",
|
||||||
"clean": "polkadot-dev-clean-build",
|
"clean": "polkadot-dev-clean-build",
|
||||||
"deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts",
|
"deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts",
|
||||||
"lint": "polkadot-dev-run-lint",
|
"lint": "polkadot-dev-run-lint",
|
||||||
"postinstall": "polkadot-dev-yarn-only",
|
"postinstall": "polkadot-dev-yarn-only",
|
||||||
"test": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --coverage --forceExit --runInBand --testPathIgnorePatterns e2e",
|
"test": "polkadot-dev-run-test --env node ^e2e",
|
||||||
"test:one": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --detectOpenHandles --forceExit"
|
"test:node": "polkadot-dev-run-test --env node ^e2e",
|
||||||
|
"test:one": "polkadot-dev-run-test --env node"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.20.12",
|
"@babel/core": "^7.21.0",
|
||||||
"@babel/register": "^7.18.9",
|
"@babel/register": "^7.21.0",
|
||||||
"@babel/runtime": "^7.20.7",
|
"@babel/runtime": "^7.21.0",
|
||||||
"@polkadot/dev": "^0.67.181",
|
"@polkadot/dev": "^0.69.27",
|
||||||
"@polkadot/typegen": "workspace:packages/typegen",
|
"@polkadot/typegen": "workspace:packages/typegen",
|
||||||
"@types/jest": "^29.2.5",
|
"@types/node": "^18.14.5"
|
||||||
"copyfiles": "^2.4.1"
|
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"typescript": "^4.9.4"
|
"typescript": "^4.9.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
@@ -20,18 +20,15 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.11.3",
|
"version": "10.0.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@polkadot/api-base": "10.0.1",
|
||||||
"@polkadot/api-base": "9.11.3",
|
"@polkadot/rpc-augment": "10.0.1",
|
||||||
"@polkadot/rpc-augment": "9.11.3",
|
"@polkadot/types": "10.0.1",
|
||||||
"@polkadot/types": "9.11.3",
|
"@polkadot/types-augment": "10.0.1",
|
||||||
"@polkadot/types-augment": "9.11.3",
|
"@polkadot/types-codec": "10.0.1",
|
||||||
"@polkadot/types-codec": "9.11.3",
|
"@polkadot/util": "^11.0.1",
|
||||||
"@polkadot/util": "^10.2.6"
|
"tslib": "^2.5.0"
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@polkadot/types-support": "9.11.3"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,18 +33,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
authorship: {
|
|
||||||
/**
|
|
||||||
* The number of blocks back we should accept uncles.
|
|
||||||
* This means that we will deal with uncle-parents that are
|
|
||||||
* `UncleGenerations + 1` before `now`.
|
|
||||||
**/
|
|
||||||
uncleGenerations: u32 & AugmentedConst<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic const
|
|
||||||
**/
|
|
||||||
[key: string]: Codec;
|
|
||||||
};
|
|
||||||
babe: {
|
babe: {
|
||||||
/**
|
/**
|
||||||
* The amount of time, in slots, that each epoch should last.
|
* The amount of time, in slots, that each epoch should last.
|
||||||
@@ -399,6 +387,15 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Max Authorities in use
|
* Max Authorities in use
|
||||||
**/
|
**/
|
||||||
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum number of entries to keep in the set id to session index mapping.
|
||||||
|
*
|
||||||
|
* Since the `SetIdSession` map is only used for validating equivocations this
|
||||||
|
* value should relate to the bonding duration of whatever staking system is
|
||||||
|
* being used (if any). If equivocation handling is not enabled then this value
|
||||||
|
* can be zero.
|
||||||
|
**/
|
||||||
|
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Generic const
|
* Generic const
|
||||||
**/
|
**/
|
||||||
@@ -540,6 +537,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* this value multiplied by `Period`.
|
* this value multiplied by `Period`.
|
||||||
**/
|
**/
|
||||||
queueCount: u32 & AugmentedConst<ApiType>;
|
queueCount: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The name for the reserve ID.
|
||||||
|
**/
|
||||||
|
reserveId: U8aFixed & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum proportion which may be thawed and the period over which it is reset.
|
* The maximum proportion which may be thawed and the period over which it is reset.
|
||||||
**/
|
**/
|
||||||
@@ -616,18 +617,28 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
/**
|
/**
|
||||||
* The maximum number of candidates in a phragmen election.
|
* The maximum number of candidates in a phragmen election.
|
||||||
*
|
*
|
||||||
* Warning: The election happens onchain, and this value will determine
|
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
|
||||||
* the size of the election. When this limit is reached no more
|
* consider how it will impact `T::WeightInfo::election_phragmen`.
|
||||||
* candidates are accepted in the election.
|
*
|
||||||
|
* When this limit is reached no more candidates are accepted in the election.
|
||||||
**/
|
**/
|
||||||
maxCandidates: u32 & AugmentedConst<ApiType>;
|
maxCandidates: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of voters to allow in a phragmen election.
|
* The maximum number of voters to allow in a phragmen election.
|
||||||
*
|
*
|
||||||
* Warning: This impacts the size of the election which is run onchain.
|
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
|
||||||
|
* consider how it will impact `T::WeightInfo::election_phragmen`.
|
||||||
|
*
|
||||||
* When the limit is reached the new voters are ignored.
|
* When the limit is reached the new voters are ignored.
|
||||||
**/
|
**/
|
||||||
maxVoters: u32 & AugmentedConst<ApiType>;
|
maxVoters: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum numbers of votes per voter.
|
||||||
|
*
|
||||||
|
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
|
||||||
|
* consider how it will impact `T::WeightInfo::election_phragmen`.
|
||||||
|
**/
|
||||||
|
maxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Identifier for the elections-phragmen pallet's lock
|
* Identifier for the elections-phragmen pallet's lock
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -45,40 +45,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
authorship: {
|
|
||||||
/**
|
|
||||||
* The uncle is genesis.
|
|
||||||
**/
|
|
||||||
GenesisUncle: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle parent not in the chain.
|
|
||||||
**/
|
|
||||||
InvalidUncleParent: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle isn't recent enough to be included.
|
|
||||||
**/
|
|
||||||
OldUncle: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle is too high in chain.
|
|
||||||
**/
|
|
||||||
TooHighUncle: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Too many uncles.
|
|
||||||
**/
|
|
||||||
TooManyUncles: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle is already included.
|
|
||||||
**/
|
|
||||||
UncleAlreadyIncluded: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Uncles already set in the block.
|
|
||||||
**/
|
|
||||||
UnclesAlreadySet: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic error
|
|
||||||
**/
|
|
||||||
[key: string]: AugmentedError<ApiType>;
|
|
||||||
};
|
|
||||||
babe: {
|
babe: {
|
||||||
/**
|
/**
|
||||||
* A given equivocation report is valid but already previously reported.
|
* A given equivocation report is valid but already previously reported.
|
||||||
@@ -509,6 +475,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The given account did not vote on the referendum.
|
* The given account did not vote on the referendum.
|
||||||
**/
|
**/
|
||||||
NotVoter: AugmentedError<ApiType>;
|
NotVoter: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The preimage does not exist.
|
||||||
|
**/
|
||||||
|
PreimageNotExist: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Proposal still blacklisted
|
* Proposal still blacklisted
|
||||||
**/
|
**/
|
||||||
@@ -724,6 +694,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* No track exists for the proposal origin.
|
* No track exists for the proposal origin.
|
||||||
**/
|
**/
|
||||||
NoTrack: AugmentedError<ApiType>;
|
NoTrack: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The preimage does not exist.
|
||||||
|
**/
|
||||||
|
PreimageNotExist: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The queue of the track is empty.
|
* The queue of the track is empty.
|
||||||
**/
|
**/
|
||||||
@@ -1036,6 +1010,18 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
nis: {
|
nis: {
|
||||||
|
/**
|
||||||
|
* The receipt is already communal.
|
||||||
|
**/
|
||||||
|
AlreadyCommunal: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* There are enough funds for what is required.
|
||||||
|
**/
|
||||||
|
AlreadyFunded: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The receipt is already private.
|
||||||
|
**/
|
||||||
|
AlreadyPrivate: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The amount of the bid is less than the minimum allowed.
|
* The amount of the bid is less than the minimum allowed.
|
||||||
**/
|
**/
|
||||||
@@ -1053,10 +1039,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The duration of the bid is less than one.
|
* The duration of the bid is less than one.
|
||||||
**/
|
**/
|
||||||
DurationTooSmall: AugmentedError<ApiType>;
|
DurationTooSmall: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* There are enough funds for what is required.
|
|
||||||
**/
|
|
||||||
Funded: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* The operation would result in a receipt worth an insignficant value.
|
* The operation would result in a receipt worth an insignficant value.
|
||||||
**/
|
**/
|
||||||
@@ -1065,30 +1047,30 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Bond not yet at expiry date.
|
* Bond not yet at expiry date.
|
||||||
**/
|
**/
|
||||||
NotExpired: AugmentedError<ApiType>;
|
NotExpired: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* The given bid for retraction is not found.
|
|
||||||
**/
|
|
||||||
NotFound: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Not the owner of the receipt.
|
* Not the owner of the receipt.
|
||||||
**/
|
**/
|
||||||
NotOwner: AugmentedError<ApiType>;
|
NotOwner: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The portion supplied is beyond the value of the receipt.
|
||||||
|
**/
|
||||||
|
PortionTooBig: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The thaw throttle has been reached for this period.
|
* The thaw throttle has been reached for this period.
|
||||||
**/
|
**/
|
||||||
Throttled: AugmentedError<ApiType>;
|
Throttled: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* The portion supplied is beyond the value of the receipt.
|
|
||||||
**/
|
|
||||||
TooMuch: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Not enough funds are held to pay out.
|
* Not enough funds are held to pay out.
|
||||||
**/
|
**/
|
||||||
Unfunded: AugmentedError<ApiType>;
|
Unfunded: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Bond index is unknown.
|
* The given bid for retraction is not found.
|
||||||
**/
|
**/
|
||||||
Unknown: AugmentedError<ApiType>;
|
UnknownBid: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Receipt index is unknown.
|
||||||
|
**/
|
||||||
|
UnknownReceipt: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Generic error
|
* Generic error
|
||||||
**/
|
**/
|
||||||
@@ -1138,6 +1120,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* pool at a time.
|
* pool at a time.
|
||||||
**/
|
**/
|
||||||
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Bonding extra is restricted to the exact pending reward amount.
|
||||||
|
**/
|
||||||
|
BondExtraRestricted: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The pools state cannot be changed.
|
* The pools state cannot be changed.
|
||||||
**/
|
**/
|
||||||
@@ -1470,12 +1456,20 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Invalid signature on statement.
|
* Invalid signature on statement.
|
||||||
**/
|
**/
|
||||||
InvalidSignature: AugmentedError<ApiType>;
|
InvalidSignature: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A dispute vote from a malicious backer.
|
||||||
|
**/
|
||||||
|
MaliciousBacker: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* No backing votes were provides along dispute statements.
|
||||||
|
**/
|
||||||
|
MissingBackingVotes: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* A dispute where there are only votes on one side.
|
* A dispute where there are only votes on one side.
|
||||||
**/
|
**/
|
||||||
SingleSidedDispute: AugmentedError<ApiType>;
|
SingleSidedDispute: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Unconfirmed dispute statement sets provided
|
* Unconfirmed dispute statement sets provided.
|
||||||
**/
|
**/
|
||||||
UnconfirmedDispute: AugmentedError<ApiType>;
|
UnconfirmedDispute: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -1740,6 +1734,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* No track exists for the proposal origin.
|
* No track exists for the proposal origin.
|
||||||
**/
|
**/
|
||||||
NoTrack: AugmentedError<ApiType>;
|
NoTrack: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The preimage does not exist.
|
||||||
|
**/
|
||||||
|
PreimageNotExist: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The queue of the track is empty.
|
* The queue of the track is empty.
|
||||||
**/
|
**/
|
||||||
@@ -2313,6 +2311,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
xcmPallet: {
|
xcmPallet: {
|
||||||
|
/**
|
||||||
|
* The given account is not an identifiable sovereign account for any location.
|
||||||
|
**/
|
||||||
|
AccountNotSovereign: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The location is invalid since it already has a subscription from us.
|
* The location is invalid since it already has a subscription from us.
|
||||||
**/
|
**/
|
||||||
@@ -2338,14 +2340,34 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The assets to be sent are empty.
|
* The assets to be sent are empty.
|
||||||
**/
|
**/
|
||||||
Empty: AugmentedError<ApiType>;
|
Empty: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The operation required fees to be paid which the initiator could not meet.
|
||||||
|
**/
|
||||||
|
FeesNotMet: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The message execution fails the filter.
|
* The message execution fails the filter.
|
||||||
**/
|
**/
|
||||||
Filtered: AugmentedError<ApiType>;
|
Filtered: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The unlock operation cannot succeed because there are still users of the lock.
|
||||||
|
**/
|
||||||
|
InUse: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Invalid asset for the operation.
|
||||||
|
**/
|
||||||
|
InvalidAsset: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Origin is invalid for sending.
|
* Origin is invalid for sending.
|
||||||
**/
|
**/
|
||||||
InvalidOrigin: AugmentedError<ApiType>;
|
InvalidOrigin: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A remote lock with the corresponding data could not be found.
|
||||||
|
**/
|
||||||
|
LockNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The owner does not own (all) of the asset that they wish to do the operation on.
|
||||||
|
**/
|
||||||
|
LowBalance: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The referenced subscription could not be found.
|
* The referenced subscription could not be found.
|
||||||
**/
|
**/
|
||||||
@@ -2359,6 +2381,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Too many assets have been attempted for transfer.
|
* Too many assets have been attempted for transfer.
|
||||||
**/
|
**/
|
||||||
TooManyAssets: AugmentedError<ApiType>;
|
TooManyAssets: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The asset owner has too many locks on the asset.
|
||||||
|
**/
|
||||||
|
TooManyLocks: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The desired destination was unreachable, generally because there is a no way of routing
|
* The desired destination was unreachable, generally because there is a no way of routing
|
||||||
* to it.
|
* to it.
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
// Copyright 2017-2023 @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'
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -10,7 +10,7 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
|
|||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KusamaRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KusamaRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||||
|
|
||||||
@@ -281,6 +281,18 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* An external proposal has been tabled.
|
* An external proposal has been tabled.
|
||||||
**/
|
**/
|
||||||
ExternalTabled: AugmentedEvent<ApiType, []>;
|
ExternalTabled: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Metadata for a proposal or a referendum has been cleared.
|
||||||
|
**/
|
||||||
|
MetadataCleared: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a proposal or a referendum has been set.
|
||||||
|
**/
|
||||||
|
MetadataSet: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
|
||||||
|
/**
|
||||||
|
* Metadata has been transferred to new owner.
|
||||||
|
**/
|
||||||
|
MetadataTransferred: AugmentedEvent<ApiType, [prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256], { prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal has been rejected by referendum.
|
* A proposal has been rejected by referendum.
|
||||||
**/
|
**/
|
||||||
@@ -337,14 +349,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* The election has been finalized, with the given computation and score.
|
* The election has been finalized, with the given computation and score.
|
||||||
**/
|
**/
|
||||||
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
|
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
|
||||||
|
/**
|
||||||
|
* There was a phase transition in a given round.
|
||||||
|
**/
|
||||||
|
PhaseTransitioned: AugmentedEvent<ApiType, [from: PalletElectionProviderMultiPhasePhase, to: PalletElectionProviderMultiPhasePhase, round: u32], { from: PalletElectionProviderMultiPhasePhase, to: PalletElectionProviderMultiPhasePhase, round: u32 }>;
|
||||||
/**
|
/**
|
||||||
* An account has been rewarded for their signed submission being finalized.
|
* An account has been rewarded for their signed submission being finalized.
|
||||||
**/
|
**/
|
||||||
Rewarded: AugmentedEvent<ApiType, [account: AccountId32, value: u128], { account: AccountId32, value: u128 }>;
|
Rewarded: AugmentedEvent<ApiType, [account: AccountId32, value: u128], { account: AccountId32, value: u128 }>;
|
||||||
/**
|
|
||||||
* The signed phase of the given round has started.
|
|
||||||
**/
|
|
||||||
SignedPhaseStarted: AugmentedEvent<ApiType, [round: u32], { round: u32 }>;
|
|
||||||
/**
|
/**
|
||||||
* An account has been slashed for submitting an invalid signed submission.
|
* An account has been slashed for submitting an invalid signed submission.
|
||||||
**/
|
**/
|
||||||
@@ -352,16 +364,13 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A solution was stored with the given compute.
|
* A solution was stored with the given compute.
|
||||||
*
|
*
|
||||||
* If the solution is signed, this means that it hasn't yet been processed. If the
|
* The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,
|
||||||
* solution is unsigned, this means that it has also been processed.
|
* the stored solution was submited in the signed phase by a miner with the `AccountId`.
|
||||||
*
|
* Otherwise, the solution was stored either during the unsigned phase or by
|
||||||
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
* `T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make
|
||||||
|
* room for this one.
|
||||||
**/
|
**/
|
||||||
SolutionStored: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
SolutionStored: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, origin: Option<AccountId32>, prevEjected: bool], { compute: PalletElectionProviderMultiPhaseElectionCompute, origin: Option<AccountId32>, prevEjected: bool }>;
|
||||||
/**
|
|
||||||
* The unsigned phase of the given round has started.
|
|
||||||
**/
|
|
||||||
UnsignedPhaseStarted: AugmentedEvent<ApiType, [round: u32], { round: u32 }>;
|
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -373,12 +382,12 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
BatchChecked: AugmentedEvent<ApiType, [eras: Vec<u32>], { eras: Vec<u32> }>;
|
BatchChecked: AugmentedEvent<ApiType, [eras: Vec<u32>], { eras: Vec<u32> }>;
|
||||||
/**
|
/**
|
||||||
* A batch was terminated.
|
* A batch of a given size was terminated.
|
||||||
*
|
*
|
||||||
* This is always follows by a number of `Unstaked` or `Slashed` events, marking the end
|
* This is always follows by a number of `Unstaked` or `Slashed` events, marking the end
|
||||||
* of the batch. A new batch will be created upon next block.
|
* of the batch. A new batch will be created upon next block.
|
||||||
**/
|
**/
|
||||||
BatchFinished: AugmentedEvent<ApiType, []>;
|
BatchFinished: AugmentedEvent<ApiType, [size_: u32], { size_: u32 }>;
|
||||||
/**
|
/**
|
||||||
* An internal error happened. Operations will be paused now.
|
* An internal error happened. Operations will be paused now.
|
||||||
**/
|
**/
|
||||||
@@ -454,6 +463,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A referendum has been killed.
|
* A referendum has been killed.
|
||||||
**/
|
**/
|
||||||
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
|
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a referendum has been cleared.
|
||||||
|
**/
|
||||||
|
MetadataCleared: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a referendum has been set.
|
||||||
|
**/
|
||||||
|
MetadataSet: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal has been rejected by referendum.
|
* A proposal has been rejected by referendum.
|
||||||
**/
|
**/
|
||||||
@@ -740,7 +757,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* The roles of a pool have been updated to the given new roles. Note that the depositor
|
* The roles of a pool have been updated to the given new roles. Note that the depositor
|
||||||
* can never change.
|
* can never change.
|
||||||
**/
|
**/
|
||||||
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32> }>;
|
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32> }>;
|
||||||
/**
|
/**
|
||||||
* The state of a pool has changed
|
* The state of a pool has changed
|
||||||
**/
|
**/
|
||||||
@@ -1028,6 +1045,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A referendum has been killed.
|
* A referendum has been killed.
|
||||||
**/
|
**/
|
||||||
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
|
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a referendum has been cleared.
|
||||||
|
**/
|
||||||
|
MetadataCleared: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a referendum has been set.
|
||||||
|
**/
|
||||||
|
MetadataSet: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal has been rejected by referendum.
|
* A proposal has been rejected by referendum.
|
||||||
**/
|
**/
|
||||||
@@ -1158,6 +1183,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A new \[max\] member count has been set
|
* A new \[max\] member count has been set
|
||||||
**/
|
**/
|
||||||
NewMaxMembers: AugmentedEvent<ApiType, [max: u32], { max: u32 }>;
|
NewMaxMembers: AugmentedEvent<ApiType, [max: u32], { max: u32 }>;
|
||||||
|
/**
|
||||||
|
* A group of members has been choosen as Skeptics
|
||||||
|
**/
|
||||||
|
SkepticsChosen: AugmentedEvent<ApiType, [skeptics: Vec<AccountId32>], { skeptics: Vec<AccountId32> }>;
|
||||||
/**
|
/**
|
||||||
* A suspended member has been judged.
|
* A suspended member has been judged.
|
||||||
**/
|
**/
|
||||||
@@ -1205,6 +1234,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* the remainder from the maximum amount of reward.
|
* the remainder from the maximum amount of reward.
|
||||||
**/
|
**/
|
||||||
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], { eraIndex: u32, validatorPayout: u128, remainder: u128 }>;
|
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], { eraIndex: u32, validatorPayout: u128, remainder: u128 }>;
|
||||||
|
/**
|
||||||
|
* A new force era mode was set.
|
||||||
|
**/
|
||||||
|
ForceEra: AugmentedEvent<ApiType, [mode: PalletStakingForcing], { mode: PalletStakingForcing }>;
|
||||||
/**
|
/**
|
||||||
* A nominator has been kicked from a validator.
|
* A nominator has been kicked from a validator.
|
||||||
**/
|
**/
|
||||||
@@ -1437,7 +1470,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* Upward message executed with the given outcome.
|
* Upward message executed with the given outcome.
|
||||||
* \[ id, outcome \]
|
* \[ id, outcome \]
|
||||||
**/
|
**/
|
||||||
ExecutedUpward: AugmentedEvent<ApiType, [U8aFixed, XcmV2TraitsOutcome]>;
|
ExecutedUpward: AugmentedEvent<ApiType, [U8aFixed, XcmV3TraitsOutcome]>;
|
||||||
/**
|
/**
|
||||||
* Upward message is invalid XCM.
|
* Upward message is invalid XCM.
|
||||||
* \[ id \]
|
* \[ id \]
|
||||||
@@ -1554,19 +1587,45 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ hash, origin, assets \]
|
* \[ hash, origin, assets \]
|
||||||
**/
|
**/
|
||||||
AssetsClaimed: AugmentedEvent<ApiType, [H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;
|
AssetsClaimed: AugmentedEvent<ApiType, [H256, XcmV3MultiLocation, XcmVersionedMultiAssets]>;
|
||||||
/**
|
/**
|
||||||
* Some assets have been placed in an asset trap.
|
* Some assets have been placed in an asset trap.
|
||||||
*
|
*
|
||||||
* \[ hash, origin, assets \]
|
* \[ hash, origin, assets \]
|
||||||
**/
|
**/
|
||||||
AssetsTrapped: AugmentedEvent<ApiType, [H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;
|
AssetsTrapped: AugmentedEvent<ApiType, [H256, XcmV3MultiLocation, XcmVersionedMultiAssets]>;
|
||||||
/**
|
/**
|
||||||
* Execution of an XCM message was attempted.
|
* Execution of an XCM message was attempted.
|
||||||
*
|
*
|
||||||
* \[ outcome \]
|
* \[ outcome \]
|
||||||
**/
|
**/
|
||||||
Attempted: AugmentedEvent<ApiType, [XcmV2TraitsOutcome]>;
|
Attempted: AugmentedEvent<ApiType, [XcmV3TraitsOutcome]>;
|
||||||
|
/**
|
||||||
|
* Fees were paid from a location for an operation (often for using `SendXcm`).
|
||||||
|
*
|
||||||
|
* \[ paying location, fees \]
|
||||||
|
**/
|
||||||
|
FeesPaid: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||||
|
/**
|
||||||
|
* Expected query response has been received but the querier location of the response does
|
||||||
|
* not match the expected. The query remains registered for a later, valid, response to
|
||||||
|
* be received and acted upon.
|
||||||
|
*
|
||||||
|
* \[ origin location, id, expected querier, maybe actual querier \]
|
||||||
|
**/
|
||||||
|
InvalidQuerier: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, XcmV3MultiLocation, Option<XcmV3MultiLocation>]>;
|
||||||
|
/**
|
||||||
|
* Expected query response has been received but the expected querier location placed in
|
||||||
|
* storage by this runtime previously cannot be decoded. The query remains registered.
|
||||||
|
*
|
||||||
|
* This is unexpected (since a location placed in storage in a previously executing
|
||||||
|
* runtime should be readable prior to query timeout) and dangerous since the possibly
|
||||||
|
* valid response will be dropped. Manual governance intervention is probably going to be
|
||||||
|
* needed.
|
||||||
|
*
|
||||||
|
* \[ origin location, id \]
|
||||||
|
**/
|
||||||
|
InvalidQuerierVersion: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||||
/**
|
/**
|
||||||
* Expected query response has been received but the origin location of the response does
|
* Expected query response has been received but the origin location of the response does
|
||||||
* not match that expected. The query remains registered for a later, valid, response to
|
* not match that expected. The query remains registered for a later, valid, response to
|
||||||
@@ -1574,7 +1633,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ origin location, id, expected location \]
|
* \[ origin location, id, expected location \]
|
||||||
**/
|
**/
|
||||||
InvalidResponder: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;
|
InvalidResponder: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, Option<XcmV3MultiLocation>]>;
|
||||||
/**
|
/**
|
||||||
* Expected query response has been received but the expected origin location placed in
|
* Expected query response has been received but the expected origin location placed in
|
||||||
* storage by this runtime previously cannot be decoded. The query remains registered.
|
* storage by this runtime previously cannot be decoded. The query remains registered.
|
||||||
@@ -1586,7 +1645,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ origin location, id \]
|
* \[ origin location, id \]
|
||||||
**/
|
**/
|
||||||
InvalidResponderVersion: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;
|
InvalidResponderVersion: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||||
/**
|
/**
|
||||||
* Query response has been received and query is removed. The registered notification has
|
* Query response has been received and query is removed. The registered notification has
|
||||||
* been dispatched and executed successfully.
|
* been dispatched and executed successfully.
|
||||||
@@ -1630,14 +1689,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ location, query ID, error \]
|
* \[ location, query ID, error \]
|
||||||
**/
|
**/
|
||||||
NotifyTargetSendFail: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, XcmV2TraitsError]>;
|
NotifyTargetSendFail: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, XcmV3TraitsError]>;
|
||||||
/**
|
/**
|
||||||
* Query response has been received and is ready for taking with `take_response`. There is
|
* Query response has been received and is ready for taking with `take_response`. There is
|
||||||
* no registered notification call.
|
* no registered notification call.
|
||||||
*
|
*
|
||||||
* \[ id, response \]
|
* \[ id, response \]
|
||||||
**/
|
**/
|
||||||
ResponseReady: AugmentedEvent<ApiType, [u64, XcmV2Response]>;
|
ResponseReady: AugmentedEvent<ApiType, [u64, XcmV3Response]>;
|
||||||
/**
|
/**
|
||||||
* Received query response has been read and removed.
|
* Received query response has been read and removed.
|
||||||
*
|
*
|
||||||
@@ -1649,14 +1708,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ origin, destination, message \]
|
* \[ origin, destination, message \]
|
||||||
**/
|
**/
|
||||||
Sent: AugmentedEvent<ApiType, [XcmV1MultiLocation, XcmV1MultiLocation, XcmV2Xcm]>;
|
Sent: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiLocation, XcmV3Xcm]>;
|
||||||
/**
|
/**
|
||||||
* The supported version of a location has been changed. This might be through an
|
* The supported version of a location has been changed. This might be through an
|
||||||
* automatic notification or a manual intervention.
|
* automatic notification or a manual intervention.
|
||||||
*
|
*
|
||||||
* \[ location, XCM version \]
|
* \[ location, XCM version \]
|
||||||
**/
|
**/
|
||||||
SupportedVersionChanged: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;
|
SupportedVersionChanged: AugmentedEvent<ApiType, [XcmV3MultiLocation, u32]>;
|
||||||
/**
|
/**
|
||||||
* Query response received which does not match a registered query. This may be because a
|
* Query response received which does not match a registered query. This may be because a
|
||||||
* matching query was never registered, it may be because it is a duplicate response, or
|
* matching query was never registered, it may be because it is a duplicate response, or
|
||||||
@@ -1664,13 +1723,34 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ origin location, id \]
|
* \[ origin location, id \]
|
||||||
**/
|
**/
|
||||||
UnexpectedResponse: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;
|
UnexpectedResponse: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||||
/**
|
/**
|
||||||
* An XCM version change notification message has been attempted to be sent.
|
* An XCM version change notification message has been attempted to be sent.
|
||||||
*
|
*
|
||||||
* \[ destination, result \]
|
* The cost of sending it (borne by the chain) is included.
|
||||||
|
*
|
||||||
|
* \[ destination, result, cost \]
|
||||||
**/
|
**/
|
||||||
VersionChangeNotified: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;
|
VersionChangeNotified: AugmentedEvent<ApiType, [XcmV3MultiLocation, u32, XcmV3MultiassetMultiAssets]>;
|
||||||
|
/**
|
||||||
|
* We have requested that a remote chain sends us XCM version change notifications.
|
||||||
|
*
|
||||||
|
* \[ destination location, cost \]
|
||||||
|
**/
|
||||||
|
VersionNotifyRequested: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||||
|
/**
|
||||||
|
* A remote has requested XCM version change notification from us and we have honored it.
|
||||||
|
* A version information message is sent to them and its cost is included.
|
||||||
|
*
|
||||||
|
* \[ destination location, cost \]
|
||||||
|
**/
|
||||||
|
VersionNotifyStarted: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||||
|
/**
|
||||||
|
* We have requested that a remote chain stops sending us XCM version change notifications.
|
||||||
|
*
|
||||||
|
* \[ destination location, cost \]
|
||||||
|
**/
|
||||||
|
VersionNotifyUnrequested: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import '@polkadot/api-base/types/storage';
|
|||||||
|
|
||||||
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
|
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
|
||||||
import type { Data } from '@polkadot/types';
|
import type { Data } from '@polkadot/types';
|
||||||
import type { Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
|
import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletConvictionVotingVoteVoting, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletConvictionVotingVoteVoting, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotPrimitivesVstagingExecutorParams, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||||
@@ -53,14 +53,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Author of current block.
|
* Author of current block.
|
||||||
**/
|
**/
|
||||||
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Whether uncles were already set in this block.
|
|
||||||
**/
|
|
||||||
didSetUncles: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
|
||||||
* Uncles
|
|
||||||
**/
|
|
||||||
uncles: AugmentedQuery<ApiType, () => Observable<Vec<PalletAuthorshipUncleEntryItem>>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -159,6 +151,17 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* epoch.
|
* epoch.
|
||||||
**/
|
**/
|
||||||
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A list of the last 100 skipped epochs and the corresponding session index
|
||||||
|
* when the epoch was skipped.
|
||||||
|
*
|
||||||
|
* This is only used for validating equivocation proofs. An equivocation proof
|
||||||
|
* must contains a key-ownership proof for a given session, therefore we need a
|
||||||
|
* way to tie together sessions and epoch indices, i.e. we need to validate that
|
||||||
|
* a validator was the owner of a given key on a given session, and what the
|
||||||
|
* active epoch index was during that session.
|
||||||
|
**/
|
||||||
|
skippedEpochs: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u64, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
|
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
|
||||||
**/
|
**/
|
||||||
@@ -411,6 +414,15 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* `ReferendumCount` if there isn't a unbaked referendum.
|
* `ReferendumCount` if there isn't a unbaked referendum.
|
||||||
**/
|
**/
|
||||||
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* General information concerning any proposal or referendum.
|
||||||
|
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
|
||||||
|
* dump or IPFS hash of a JSON file.
|
||||||
|
*
|
||||||
|
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
|
||||||
|
* large preimages.
|
||||||
|
**/
|
||||||
|
metadataOf: AugmentedQuery<ApiType, (arg: PalletDemocracyMetadataOwner | { External: any } | { Proposal: any } | { Referendum: any } | string | Uint8Array) => Observable<Option<H256>>, [PalletDemocracyMetadataOwner]> & QueryableStorageEntry<ApiType, [PalletDemocracyMetadataOwner]>;
|
||||||
/**
|
/**
|
||||||
* The referendum to be tabled whenever it would be valid to table an external proposal.
|
* The referendum to be tabled whenever it would be valid to table an external proposal.
|
||||||
* This happens when a referendum needs to be tabled and one of two conditions are met:
|
* This happens when a referendum needs to be tabled and one of two conditions are met:
|
||||||
@@ -569,6 +581,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The map of all accounts wishing to be unstaked.
|
* The map of all accounts wishing to be unstaked.
|
||||||
*
|
*
|
||||||
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -610,6 +624,15 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The number of referenda being decided currently.
|
* The number of referenda being decided currently.
|
||||||
**/
|
**/
|
||||||
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||||
|
/**
|
||||||
|
* The metadata is a general information concerning the referendum.
|
||||||
|
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
|
||||||
|
* dump or IPFS hash of a JSON file.
|
||||||
|
*
|
||||||
|
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
|
||||||
|
* large preimages.
|
||||||
|
**/
|
||||||
|
metadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<H256>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The next free referendum index, aka the number of referenda started so far.
|
* The next free referendum index, aka the number of referenda started so far.
|
||||||
**/
|
**/
|
||||||
@@ -648,6 +671,12 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* A mapping from grandpa set ID to the index of the *most recent* session for which its
|
* A mapping from grandpa set ID to the index of the *most recent* session for which its
|
||||||
* members were responsible.
|
* members were responsible.
|
||||||
*
|
*
|
||||||
|
* This is only used for validating equivocation proofs. An equivocation proof must
|
||||||
|
* contains a key-ownership proof for a given session, therefore we need a way to tie
|
||||||
|
* together sessions and GRANDPA set ids, i.e. we need to validate that a validator
|
||||||
|
* was the owner of a given key on a given session, and what the active set ID was
|
||||||
|
* during that session.
|
||||||
|
*
|
||||||
* TWOX-NOTE: `SetId` is not under user control.
|
* TWOX-NOTE: `SetId` is not under user control.
|
||||||
**/
|
**/
|
||||||
setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||||
@@ -940,6 +969,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Storage for bonded pools.
|
* Storage for bonded pools.
|
||||||
**/
|
**/
|
||||||
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Map from a pool member account to their opted claim permission.
|
||||||
|
**/
|
||||||
|
claimPermissions: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletNominationPoolsClaimPermission>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Counter for the related counted storage map
|
* Counter for the related counted storage map
|
||||||
**/
|
**/
|
||||||
@@ -1003,6 +1036,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Active members.
|
* Active members.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -1276,6 +1311,11 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
parasDisputes: {
|
parasDisputes: {
|
||||||
|
/**
|
||||||
|
* Backing votes stored for each dispute.
|
||||||
|
* This storage is used for slashing.
|
||||||
|
**/
|
||||||
|
backersOnDisputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<BTreeSet<u32>>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||||
/**
|
/**
|
||||||
* All ongoing or concluded disputes for the last several sessions.
|
* All ongoing or concluded disputes for the last several sessions.
|
||||||
**/
|
**/
|
||||||
@@ -1317,6 +1357,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The earliest session for which previous session info is stored.
|
* The earliest session for which previous session info is stored.
|
||||||
**/
|
**/
|
||||||
earliestStoredSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
earliestStoredSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Executor parameter set for a given session index
|
||||||
|
**/
|
||||||
|
sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesVstagingExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Session information in a rolling window.
|
* Session information in a rolling window.
|
||||||
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
||||||
@@ -1440,6 +1484,15 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The number of referenda being decided currently.
|
* The number of referenda being decided currently.
|
||||||
**/
|
**/
|
||||||
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||||
|
/**
|
||||||
|
* The metadata is a general information concerning the referendum.
|
||||||
|
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
|
||||||
|
* dump or IPFS hash of a JSON file.
|
||||||
|
*
|
||||||
|
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
|
||||||
|
* large preimages.
|
||||||
|
**/
|
||||||
|
metadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<H256>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The next free referendum index, aka the number of referenda started so far.
|
* The next free referendum index, aka the number of referenda started so far.
|
||||||
**/
|
**/
|
||||||
@@ -1645,6 +1698,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
activeEra: AugmentedQuery<ApiType, () => Observable<Option<PalletStakingActiveEraInfo>>, []> & QueryableStorageEntry<ApiType, []>;
|
activeEra: AugmentedQuery<ApiType, () => Observable<Option<PalletStakingActiveEraInfo>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Map from all locked "stash" accounts to the controller account.
|
* Map from all locked "stash" accounts to the controller account.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
bonded: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<AccountId32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
bonded: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<AccountId32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -1805,6 +1860,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
*
|
*
|
||||||
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
|
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
|
||||||
* [`Call::chill_other`] dispatchable by anyone.
|
* [`Call::chill_other`] dispatchable by anyone.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
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]>;
|
||||||
/**
|
/**
|
||||||
@@ -1825,6 +1882,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
offendingValidators: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, bool]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
offendingValidators: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, bool]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Where the reward payment should be made. Keyed by stash.
|
* Where the reward payment should be made. Keyed by stash.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
payee: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletStakingRewardDestination>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
payee: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletStakingRewardDestination>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -1852,6 +1911,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
validatorCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
validatorCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The map from (wannabe) validator stash key to the preferences of that validator.
|
* The map from (wannabe) validator stash key to the preferences of that validator.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
validators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletStakingValidatorPrefs>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
validators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletStakingValidatorPrefs>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2056,6 +2117,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
ump: {
|
ump: {
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForOverweight: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry.
|
* The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry.
|
||||||
*
|
*
|
||||||
@@ -2168,6 +2233,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The current migration's stage, if any.
|
* The current migration's stage, if any.
|
||||||
**/
|
**/
|
||||||
currentMigration: AugmentedQuery<ApiType, () => Observable<Option<PalletXcmVersionMigrationStage>>, []> & QueryableStorageEntry<ApiType, []>;
|
currentMigration: AugmentedQuery<ApiType, () => Observable<Option<PalletXcmVersionMigrationStage>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Fungible assets which we know are locked on this chain.
|
||||||
|
**/
|
||||||
|
lockedFungibles: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<Vec<ITuple<[u128, XcmVersionedMultiLocation]>>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* The ongoing queries.
|
* The ongoing queries.
|
||||||
**/
|
**/
|
||||||
@@ -2176,6 +2245,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The latest available query index.
|
* The latest available query index.
|
||||||
**/
|
**/
|
||||||
queryCounter: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
queryCounter: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Fungible assets which we know are locked on a remote chain.
|
||||||
|
**/
|
||||||
|
remoteLockedFungibles: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array, arg3: XcmVersionedAssetId | { V3: any } | string | Uint8Array) => Observable<Option<PalletXcmRemoteLockedFungibleRecord>>, [u32, AccountId32, XcmVersionedAssetId]> & QueryableStorageEntry<ApiType, [u32, AccountId32, XcmVersionedAssetId]>;
|
||||||
/**
|
/**
|
||||||
* Default version to encode XCM when latest version of destination is unknown. If `None`,
|
* Default version to encode XCM when latest version of destination is unknown. If `None`,
|
||||||
* then the destinations whose XCM version is unknown are considered unreachable.
|
* then the destinations whose XCM version is unknown are considered unreachable.
|
||||||
@@ -2184,7 +2257,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* The Latest versions that we know various locations support.
|
* The Latest versions that we know various locations support.
|
||||||
**/
|
**/
|
||||||
supportedVersion: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array) => Observable<Option<u32>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
supportedVersion: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V2: any } | { V3: any } | string | Uint8Array) => Observable<Option<u32>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
||||||
/**
|
/**
|
||||||
* Destinations whose latest XCM version we would like to know. Duplicates not allowed, and
|
* Destinations whose latest XCM version we would like to know. Duplicates not allowed, and
|
||||||
* the `u32` counter is the number of times that a send to the destination has been attempted,
|
* the `u32` counter is the number of times that a send to the destination has been attempted,
|
||||||
@@ -2194,12 +2267,12 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* All locations that we have requested version notifications from.
|
* All locations that we have requested version notifications from.
|
||||||
**/
|
**/
|
||||||
versionNotifiers: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array) => Observable<Option<u64>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
versionNotifiers: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V2: any } | { V3: any } | string | Uint8Array) => Observable<Option<u64>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
||||||
/**
|
/**
|
||||||
* The target locations that are subscribed to our version changes, as well as the most recent
|
* The target locations that are subscribed to our version changes, as well as the most recent
|
||||||
* of our versions we informed them of.
|
* of our versions we informed them of.
|
||||||
**/
|
**/
|
||||||
versionNotifyTargets: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array) => Observable<Option<ITuple<[u64, u64, u32]>>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
versionNotifyTargets: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V2: any } | { V3: any } | string | Uint8Array) => Observable<Option<ITuple<[u64, SpWeightsWeightV2Weight, u32]>>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
|||||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||||
@@ -333,7 +333,7 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: DecoratedCallBase<ApiType>;
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
};
|
};
|
||||||
/** 0x37c8bb1350a9a2a8/2 */
|
/** 0x37c8bb1350a9a2a8/3 */
|
||||||
transactionPaymentApi: {
|
transactionPaymentApi: {
|
||||||
/**
|
/**
|
||||||
* The transaction fee details
|
* The transaction fee details
|
||||||
@@ -343,12 +343,20 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
* The transaction info
|
* The transaction info
|
||||||
**/
|
**/
|
||||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current LengthToFee given some input
|
||||||
|
**/
|
||||||
|
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current WeightToFee given some input
|
||||||
|
**/
|
||||||
|
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||||
/**
|
/**
|
||||||
* Generic call
|
* Generic call
|
||||||
**/
|
**/
|
||||||
[key: string]: DecoratedCallBase<ApiType>;
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
};
|
};
|
||||||
/** 0xf3ff14d5ab527059/2 */
|
/** 0xf3ff14d5ab527059/3 */
|
||||||
transactionPaymentCallApi: {
|
transactionPaymentCallApi: {
|
||||||
/**
|
/**
|
||||||
* The call fee details
|
* The call fee details
|
||||||
@@ -358,6 +366,14 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
* The call info
|
* The call info
|
||||||
**/
|
**/
|
||||||
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current LengthToFee given some input
|
||||||
|
**/
|
||||||
|
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current WeightToFee given some input
|
||||||
|
**/
|
||||||
|
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||||
/**
|
/**
|
||||||
* Generic call
|
* Generic call
|
||||||
**/
|
**/
|
||||||
|
|||||||
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/api-augment', path: 'auto', type: 'auto', version: '9.11.3' };
|
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '10.0.1' };
|
||||||
|
|||||||
@@ -33,18 +33,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
authorship: {
|
|
||||||
/**
|
|
||||||
* The number of blocks back we should accept uncles.
|
|
||||||
* This means that we will deal with uncle-parents that are
|
|
||||||
* `UncleGenerations + 1` before `now`.
|
|
||||||
**/
|
|
||||||
uncleGenerations: u32 & AugmentedConst<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic const
|
|
||||||
**/
|
|
||||||
[key: string]: Codec;
|
|
||||||
};
|
|
||||||
babe: {
|
babe: {
|
||||||
/**
|
/**
|
||||||
* The amount of time, in slots, that each epoch should last.
|
* The amount of time, in slots, that each epoch should last.
|
||||||
@@ -350,6 +338,15 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Max Authorities in use
|
* Max Authorities in use
|
||||||
**/
|
**/
|
||||||
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum number of entries to keep in the set id to session index mapping.
|
||||||
|
*
|
||||||
|
* Since the `SetIdSession` map is only used for validating equivocations this
|
||||||
|
* value should relate to the bonding duration of whatever staking system is
|
||||||
|
* being used (if any). If equivocation handling is not enabled then this value
|
||||||
|
* can be zero.
|
||||||
|
**/
|
||||||
|
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Generic const
|
* Generic const
|
||||||
**/
|
**/
|
||||||
@@ -485,18 +482,28 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
/**
|
/**
|
||||||
* The maximum number of candidates in a phragmen election.
|
* The maximum number of candidates in a phragmen election.
|
||||||
*
|
*
|
||||||
* Warning: The election happens onchain, and this value will determine
|
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
|
||||||
* the size of the election. When this limit is reached no more
|
* consider how it will impact `T::WeightInfo::election_phragmen`.
|
||||||
* candidates are accepted in the election.
|
*
|
||||||
|
* When this limit is reached no more candidates are accepted in the election.
|
||||||
**/
|
**/
|
||||||
maxCandidates: u32 & AugmentedConst<ApiType>;
|
maxCandidates: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of voters to allow in a phragmen election.
|
* The maximum number of voters to allow in a phragmen election.
|
||||||
*
|
*
|
||||||
* Warning: This impacts the size of the election which is run onchain.
|
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
|
||||||
|
* consider how it will impact `T::WeightInfo::election_phragmen`.
|
||||||
|
*
|
||||||
* When the limit is reached the new voters are ignored.
|
* When the limit is reached the new voters are ignored.
|
||||||
**/
|
**/
|
||||||
maxVoters: u32 & AugmentedConst<ApiType>;
|
maxVoters: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum numbers of votes per voter.
|
||||||
|
*
|
||||||
|
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
|
||||||
|
* consider how it will impact `T::WeightInfo::election_phragmen`.
|
||||||
|
**/
|
||||||
|
maxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Identifier for the elections-phragmen pallet's lock
|
* Identifier for the elections-phragmen pallet's lock
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -45,40 +45,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
authorship: {
|
|
||||||
/**
|
|
||||||
* The uncle is genesis.
|
|
||||||
**/
|
|
||||||
GenesisUncle: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle parent not in the chain.
|
|
||||||
**/
|
|
||||||
InvalidUncleParent: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle isn't recent enough to be included.
|
|
||||||
**/
|
|
||||||
OldUncle: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle is too high in chain.
|
|
||||||
**/
|
|
||||||
TooHighUncle: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Too many uncles.
|
|
||||||
**/
|
|
||||||
TooManyUncles: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle is already included.
|
|
||||||
**/
|
|
||||||
UncleAlreadyIncluded: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Uncles already set in the block.
|
|
||||||
**/
|
|
||||||
UnclesAlreadySet: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic error
|
|
||||||
**/
|
|
||||||
[key: string]: AugmentedError<ApiType>;
|
|
||||||
};
|
|
||||||
babe: {
|
babe: {
|
||||||
/**
|
/**
|
||||||
* A given equivocation report is valid but already previously reported.
|
* A given equivocation report is valid but already previously reported.
|
||||||
@@ -454,6 +420,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The given account did not vote on the referendum.
|
* The given account did not vote on the referendum.
|
||||||
**/
|
**/
|
||||||
NotVoter: AugmentedError<ApiType>;
|
NotVoter: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The preimage does not exist.
|
||||||
|
**/
|
||||||
|
PreimageNotExist: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Proposal still blacklisted
|
* Proposal still blacklisted
|
||||||
**/
|
**/
|
||||||
@@ -890,6 +860,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* pool at a time.
|
* pool at a time.
|
||||||
**/
|
**/
|
||||||
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Bonding extra is restricted to the exact pending reward amount.
|
||||||
|
**/
|
||||||
|
BondExtraRestricted: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The pools state cannot be changed.
|
* The pools state cannot be changed.
|
||||||
**/
|
**/
|
||||||
@@ -1222,12 +1196,20 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Invalid signature on statement.
|
* Invalid signature on statement.
|
||||||
**/
|
**/
|
||||||
InvalidSignature: AugmentedError<ApiType>;
|
InvalidSignature: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A dispute vote from a malicious backer.
|
||||||
|
**/
|
||||||
|
MaliciousBacker: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* No backing votes were provides along dispute statements.
|
||||||
|
**/
|
||||||
|
MissingBackingVotes: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* A dispute where there are only votes on one side.
|
* A dispute where there are only votes on one side.
|
||||||
**/
|
**/
|
||||||
SingleSidedDispute: AugmentedError<ApiType>;
|
SingleSidedDispute: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Unconfirmed dispute statement sets provided
|
* Unconfirmed dispute statement sets provided.
|
||||||
**/
|
**/
|
||||||
UnconfirmedDispute: AugmentedError<ApiType>;
|
UnconfirmedDispute: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -1837,6 +1819,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
xcmPallet: {
|
xcmPallet: {
|
||||||
|
/**
|
||||||
|
* The given account is not an identifiable sovereign account for any location.
|
||||||
|
**/
|
||||||
|
AccountNotSovereign: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The location is invalid since it already has a subscription from us.
|
* The location is invalid since it already has a subscription from us.
|
||||||
**/
|
**/
|
||||||
@@ -1862,14 +1848,34 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The assets to be sent are empty.
|
* The assets to be sent are empty.
|
||||||
**/
|
**/
|
||||||
Empty: AugmentedError<ApiType>;
|
Empty: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The operation required fees to be paid which the initiator could not meet.
|
||||||
|
**/
|
||||||
|
FeesNotMet: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The message execution fails the filter.
|
* The message execution fails the filter.
|
||||||
**/
|
**/
|
||||||
Filtered: AugmentedError<ApiType>;
|
Filtered: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The unlock operation cannot succeed because there are still users of the lock.
|
||||||
|
**/
|
||||||
|
InUse: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Invalid asset for the operation.
|
||||||
|
**/
|
||||||
|
InvalidAsset: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Origin is invalid for sending.
|
* Origin is invalid for sending.
|
||||||
**/
|
**/
|
||||||
InvalidOrigin: AugmentedError<ApiType>;
|
InvalidOrigin: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A remote lock with the corresponding data could not be found.
|
||||||
|
**/
|
||||||
|
LockNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The owner does not own (all) of the asset that they wish to do the operation on.
|
||||||
|
**/
|
||||||
|
LowBalance: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The referenced subscription could not be found.
|
* The referenced subscription could not be found.
|
||||||
**/
|
**/
|
||||||
@@ -1883,6 +1889,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Too many assets have been attempted for transfer.
|
* Too many assets have been attempted for transfer.
|
||||||
**/
|
**/
|
||||||
TooManyAssets: AugmentedError<ApiType>;
|
TooManyAssets: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The asset owner has too many locks on the asset.
|
||||||
|
**/
|
||||||
|
TooManyLocks: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The desired destination was unreachable, generally because there is a no way of routing
|
* The desired destination was unreachable, generally because there is a no way of routing
|
||||||
* to it.
|
* to it.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
|
|||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, H256, Perbill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256, Perbill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpWeightsWeightV2Weight, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||||
|
|
||||||
@@ -267,6 +267,18 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* An external proposal has been tabled.
|
* An external proposal has been tabled.
|
||||||
**/
|
**/
|
||||||
ExternalTabled: AugmentedEvent<ApiType, []>;
|
ExternalTabled: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Metadata for a proposal or a referendum has been cleared.
|
||||||
|
**/
|
||||||
|
MetadataCleared: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a proposal or a referendum has been set.
|
||||||
|
**/
|
||||||
|
MetadataSet: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
|
||||||
|
/**
|
||||||
|
* Metadata has been transferred to new owner.
|
||||||
|
**/
|
||||||
|
MetadataTransferred: AugmentedEvent<ApiType, [prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256], { prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal has been rejected by referendum.
|
* A proposal has been rejected by referendum.
|
||||||
**/
|
**/
|
||||||
@@ -323,14 +335,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* The election has been finalized, with the given computation and score.
|
* The election has been finalized, with the given computation and score.
|
||||||
**/
|
**/
|
||||||
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
|
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
|
||||||
|
/**
|
||||||
|
* There was a phase transition in a given round.
|
||||||
|
**/
|
||||||
|
PhaseTransitioned: AugmentedEvent<ApiType, [from: PalletElectionProviderMultiPhasePhase, to: PalletElectionProviderMultiPhasePhase, round: u32], { from: PalletElectionProviderMultiPhasePhase, to: PalletElectionProviderMultiPhasePhase, round: u32 }>;
|
||||||
/**
|
/**
|
||||||
* An account has been rewarded for their signed submission being finalized.
|
* An account has been rewarded for their signed submission being finalized.
|
||||||
**/
|
**/
|
||||||
Rewarded: AugmentedEvent<ApiType, [account: AccountId32, value: u128], { account: AccountId32, value: u128 }>;
|
Rewarded: AugmentedEvent<ApiType, [account: AccountId32, value: u128], { account: AccountId32, value: u128 }>;
|
||||||
/**
|
|
||||||
* The signed phase of the given round has started.
|
|
||||||
**/
|
|
||||||
SignedPhaseStarted: AugmentedEvent<ApiType, [round: u32], { round: u32 }>;
|
|
||||||
/**
|
/**
|
||||||
* An account has been slashed for submitting an invalid signed submission.
|
* An account has been slashed for submitting an invalid signed submission.
|
||||||
**/
|
**/
|
||||||
@@ -338,16 +350,13 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A solution was stored with the given compute.
|
* A solution was stored with the given compute.
|
||||||
*
|
*
|
||||||
* If the solution is signed, this means that it hasn't yet been processed. If the
|
* The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,
|
||||||
* solution is unsigned, this means that it has also been processed.
|
* the stored solution was submited in the signed phase by a miner with the `AccountId`.
|
||||||
*
|
* Otherwise, the solution was stored either during the unsigned phase or by
|
||||||
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
* `T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make
|
||||||
|
* room for this one.
|
||||||
**/
|
**/
|
||||||
SolutionStored: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
SolutionStored: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, origin: Option<AccountId32>, prevEjected: bool], { compute: PalletElectionProviderMultiPhaseElectionCompute, origin: Option<AccountId32>, prevEjected: bool }>;
|
||||||
/**
|
|
||||||
* The unsigned phase of the given round has started.
|
|
||||||
**/
|
|
||||||
UnsignedPhaseStarted: AugmentedEvent<ApiType, [round: u32], { round: u32 }>;
|
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -359,12 +368,12 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
BatchChecked: AugmentedEvent<ApiType, [eras: Vec<u32>], { eras: Vec<u32> }>;
|
BatchChecked: AugmentedEvent<ApiType, [eras: Vec<u32>], { eras: Vec<u32> }>;
|
||||||
/**
|
/**
|
||||||
* A batch was terminated.
|
* A batch of a given size was terminated.
|
||||||
*
|
*
|
||||||
* This is always follows by a number of `Unstaked` or `Slashed` events, marking the end
|
* This is always follows by a number of `Unstaked` or `Slashed` events, marking the end
|
||||||
* of the batch. A new batch will be created upon next block.
|
* of the batch. A new batch will be created upon next block.
|
||||||
**/
|
**/
|
||||||
BatchFinished: AugmentedEvent<ApiType, []>;
|
BatchFinished: AugmentedEvent<ApiType, [size_: u32], { size_: u32 }>;
|
||||||
/**
|
/**
|
||||||
* An internal error happened. Operations will be paused now.
|
* An internal error happened. Operations will be paused now.
|
||||||
**/
|
**/
|
||||||
@@ -565,7 +574,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* The roles of a pool have been updated to the given new roles. Note that the depositor
|
* The roles of a pool have been updated to the given new roles. Note that the depositor
|
||||||
* can never change.
|
* can never change.
|
||||||
**/
|
**/
|
||||||
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32> }>;
|
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32> }>;
|
||||||
/**
|
/**
|
||||||
* The state of a pool has changed
|
* The state of a pool has changed
|
||||||
**/
|
**/
|
||||||
@@ -871,6 +880,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* the remainder from the maximum amount of reward.
|
* the remainder from the maximum amount of reward.
|
||||||
**/
|
**/
|
||||||
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], { eraIndex: u32, validatorPayout: u128, remainder: u128 }>;
|
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], { eraIndex: u32, validatorPayout: u128, remainder: u128 }>;
|
||||||
|
/**
|
||||||
|
* A new force era mode was set.
|
||||||
|
**/
|
||||||
|
ForceEra: AugmentedEvent<ApiType, [mode: PalletStakingForcing], { mode: PalletStakingForcing }>;
|
||||||
/**
|
/**
|
||||||
* A nominator has been kicked from a validator.
|
* A nominator has been kicked from a validator.
|
||||||
**/
|
**/
|
||||||
@@ -1103,7 +1116,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* Upward message executed with the given outcome.
|
* Upward message executed with the given outcome.
|
||||||
* \[ id, outcome \]
|
* \[ id, outcome \]
|
||||||
**/
|
**/
|
||||||
ExecutedUpward: AugmentedEvent<ApiType, [U8aFixed, XcmV2TraitsOutcome]>;
|
ExecutedUpward: AugmentedEvent<ApiType, [U8aFixed, XcmV3TraitsOutcome]>;
|
||||||
/**
|
/**
|
||||||
* Upward message is invalid XCM.
|
* Upward message is invalid XCM.
|
||||||
* \[ id \]
|
* \[ id \]
|
||||||
@@ -1211,19 +1224,45 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ hash, origin, assets \]
|
* \[ hash, origin, assets \]
|
||||||
**/
|
**/
|
||||||
AssetsClaimed: AugmentedEvent<ApiType, [H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;
|
AssetsClaimed: AugmentedEvent<ApiType, [H256, XcmV3MultiLocation, XcmVersionedMultiAssets]>;
|
||||||
/**
|
/**
|
||||||
* Some assets have been placed in an asset trap.
|
* Some assets have been placed in an asset trap.
|
||||||
*
|
*
|
||||||
* \[ hash, origin, assets \]
|
* \[ hash, origin, assets \]
|
||||||
**/
|
**/
|
||||||
AssetsTrapped: AugmentedEvent<ApiType, [H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;
|
AssetsTrapped: AugmentedEvent<ApiType, [H256, XcmV3MultiLocation, XcmVersionedMultiAssets]>;
|
||||||
/**
|
/**
|
||||||
* Execution of an XCM message was attempted.
|
* Execution of an XCM message was attempted.
|
||||||
*
|
*
|
||||||
* \[ outcome \]
|
* \[ outcome \]
|
||||||
**/
|
**/
|
||||||
Attempted: AugmentedEvent<ApiType, [XcmV2TraitsOutcome]>;
|
Attempted: AugmentedEvent<ApiType, [XcmV3TraitsOutcome]>;
|
||||||
|
/**
|
||||||
|
* Fees were paid from a location for an operation (often for using `SendXcm`).
|
||||||
|
*
|
||||||
|
* \[ paying location, fees \]
|
||||||
|
**/
|
||||||
|
FeesPaid: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||||
|
/**
|
||||||
|
* Expected query response has been received but the querier location of the response does
|
||||||
|
* not match the expected. The query remains registered for a later, valid, response to
|
||||||
|
* be received and acted upon.
|
||||||
|
*
|
||||||
|
* \[ origin location, id, expected querier, maybe actual querier \]
|
||||||
|
**/
|
||||||
|
InvalidQuerier: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, XcmV3MultiLocation, Option<XcmV3MultiLocation>]>;
|
||||||
|
/**
|
||||||
|
* Expected query response has been received but the expected querier location placed in
|
||||||
|
* storage by this runtime previously cannot be decoded. The query remains registered.
|
||||||
|
*
|
||||||
|
* This is unexpected (since a location placed in storage in a previously executing
|
||||||
|
* runtime should be readable prior to query timeout) and dangerous since the possibly
|
||||||
|
* valid response will be dropped. Manual governance intervention is probably going to be
|
||||||
|
* needed.
|
||||||
|
*
|
||||||
|
* \[ origin location, id \]
|
||||||
|
**/
|
||||||
|
InvalidQuerierVersion: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||||
/**
|
/**
|
||||||
* Expected query response has been received but the origin location of the response does
|
* Expected query response has been received but the origin location of the response does
|
||||||
* not match that expected. The query remains registered for a later, valid, response to
|
* not match that expected. The query remains registered for a later, valid, response to
|
||||||
@@ -1231,7 +1270,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ origin location, id, expected location \]
|
* \[ origin location, id, expected location \]
|
||||||
**/
|
**/
|
||||||
InvalidResponder: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, Option<XcmV1MultiLocation>]>;
|
InvalidResponder: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, Option<XcmV3MultiLocation>]>;
|
||||||
/**
|
/**
|
||||||
* Expected query response has been received but the expected origin location placed in
|
* Expected query response has been received but the expected origin location placed in
|
||||||
* storage by this runtime previously cannot be decoded. The query remains registered.
|
* storage by this runtime previously cannot be decoded. The query remains registered.
|
||||||
@@ -1243,7 +1282,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ origin location, id \]
|
* \[ origin location, id \]
|
||||||
**/
|
**/
|
||||||
InvalidResponderVersion: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;
|
InvalidResponderVersion: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||||
/**
|
/**
|
||||||
* Query response has been received and query is removed. The registered notification has
|
* Query response has been received and query is removed. The registered notification has
|
||||||
* been dispatched and executed successfully.
|
* been dispatched and executed successfully.
|
||||||
@@ -1287,14 +1326,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ location, query ID, error \]
|
* \[ location, query ID, error \]
|
||||||
**/
|
**/
|
||||||
NotifyTargetSendFail: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64, XcmV2TraitsError]>;
|
NotifyTargetSendFail: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64, XcmV3TraitsError]>;
|
||||||
/**
|
/**
|
||||||
* Query response has been received and is ready for taking with `take_response`. There is
|
* Query response has been received and is ready for taking with `take_response`. There is
|
||||||
* no registered notification call.
|
* no registered notification call.
|
||||||
*
|
*
|
||||||
* \[ id, response \]
|
* \[ id, response \]
|
||||||
**/
|
**/
|
||||||
ResponseReady: AugmentedEvent<ApiType, [u64, XcmV2Response]>;
|
ResponseReady: AugmentedEvent<ApiType, [u64, XcmV3Response]>;
|
||||||
/**
|
/**
|
||||||
* Received query response has been read and removed.
|
* Received query response has been read and removed.
|
||||||
*
|
*
|
||||||
@@ -1306,14 +1345,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ origin, destination, message \]
|
* \[ origin, destination, message \]
|
||||||
**/
|
**/
|
||||||
Sent: AugmentedEvent<ApiType, [XcmV1MultiLocation, XcmV1MultiLocation, XcmV2Xcm]>;
|
Sent: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiLocation, XcmV3Xcm]>;
|
||||||
/**
|
/**
|
||||||
* The supported version of a location has been changed. This might be through an
|
* The supported version of a location has been changed. This might be through an
|
||||||
* automatic notification or a manual intervention.
|
* automatic notification or a manual intervention.
|
||||||
*
|
*
|
||||||
* \[ location, XCM version \]
|
* \[ location, XCM version \]
|
||||||
**/
|
**/
|
||||||
SupportedVersionChanged: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;
|
SupportedVersionChanged: AugmentedEvent<ApiType, [XcmV3MultiLocation, u32]>;
|
||||||
/**
|
/**
|
||||||
* Query response received which does not match a registered query. This may be because a
|
* Query response received which does not match a registered query. This may be because a
|
||||||
* matching query was never registered, it may be because it is a duplicate response, or
|
* matching query was never registered, it may be because it is a duplicate response, or
|
||||||
@@ -1321,13 +1360,34 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ origin location, id \]
|
* \[ origin location, id \]
|
||||||
**/
|
**/
|
||||||
UnexpectedResponse: AugmentedEvent<ApiType, [XcmV1MultiLocation, u64]>;
|
UnexpectedResponse: AugmentedEvent<ApiType, [XcmV3MultiLocation, u64]>;
|
||||||
/**
|
/**
|
||||||
* An XCM version change notification message has been attempted to be sent.
|
* An XCM version change notification message has been attempted to be sent.
|
||||||
*
|
*
|
||||||
* \[ destination, result \]
|
* The cost of sending it (borne by the chain) is included.
|
||||||
|
*
|
||||||
|
* \[ destination, result, cost \]
|
||||||
**/
|
**/
|
||||||
VersionChangeNotified: AugmentedEvent<ApiType, [XcmV1MultiLocation, u32]>;
|
VersionChangeNotified: AugmentedEvent<ApiType, [XcmV3MultiLocation, u32, XcmV3MultiassetMultiAssets]>;
|
||||||
|
/**
|
||||||
|
* We have requested that a remote chain sends us XCM version change notifications.
|
||||||
|
*
|
||||||
|
* \[ destination location, cost \]
|
||||||
|
**/
|
||||||
|
VersionNotifyRequested: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||||
|
/**
|
||||||
|
* A remote has requested XCM version change notification from us and we have honored it.
|
||||||
|
* A version information message is sent to them and its cost is included.
|
||||||
|
*
|
||||||
|
* \[ destination location, cost \]
|
||||||
|
**/
|
||||||
|
VersionNotifyStarted: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||||
|
/**
|
||||||
|
* We have requested that a remote chain stops sending us XCM version change notifications.
|
||||||
|
*
|
||||||
|
* \[ destination location, cost \]
|
||||||
|
**/
|
||||||
|
VersionNotifyUnrequested: AugmentedEvent<ApiType, [XcmV3MultiLocation, XcmV3MultiassetMultiAssets]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import '@polkadot/api-base/types/storage';
|
|||||||
|
|
||||||
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
|
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
|
||||||
import type { Data } from '@polkadot/types';
|
import type { Data } from '@polkadot/types';
|
||||||
import type { Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotPrimitivesVstagingExecutorParams, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||||
@@ -53,14 +53,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Author of current block.
|
* Author of current block.
|
||||||
**/
|
**/
|
||||||
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Whether uncles were already set in this block.
|
|
||||||
**/
|
|
||||||
didSetUncles: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
|
||||||
* Uncles
|
|
||||||
**/
|
|
||||||
uncles: AugmentedQuery<ApiType, () => Observable<Vec<PalletAuthorshipUncleEntryItem>>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -159,6 +151,17 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* epoch.
|
* epoch.
|
||||||
**/
|
**/
|
||||||
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A list of the last 100 skipped epochs and the corresponding session index
|
||||||
|
* when the epoch was skipped.
|
||||||
|
*
|
||||||
|
* This is only used for validating equivocation proofs. An equivocation proof
|
||||||
|
* must contains a key-ownership proof for a given session, therefore we need a
|
||||||
|
* way to tie together sessions and epoch indices, i.e. we need to validate that
|
||||||
|
* a validator was the owner of a given key on a given session, and what the
|
||||||
|
* active epoch index was during that session.
|
||||||
|
**/
|
||||||
|
skippedEpochs: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u64, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
|
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
|
||||||
**/
|
**/
|
||||||
@@ -394,6 +397,15 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* `ReferendumCount` if there isn't a unbaked referendum.
|
* `ReferendumCount` if there isn't a unbaked referendum.
|
||||||
**/
|
**/
|
||||||
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* General information concerning any proposal or referendum.
|
||||||
|
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
|
||||||
|
* dump or IPFS hash of a JSON file.
|
||||||
|
*
|
||||||
|
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
|
||||||
|
* large preimages.
|
||||||
|
**/
|
||||||
|
metadataOf: AugmentedQuery<ApiType, (arg: PalletDemocracyMetadataOwner | { External: any } | { Proposal: any } | { Referendum: any } | string | Uint8Array) => Observable<Option<H256>>, [PalletDemocracyMetadataOwner]> & QueryableStorageEntry<ApiType, [PalletDemocracyMetadataOwner]>;
|
||||||
/**
|
/**
|
||||||
* The referendum to be tabled whenever it would be valid to table an external proposal.
|
* The referendum to be tabled whenever it would be valid to table an external proposal.
|
||||||
* This happens when a referendum needs to be tabled and one of two conditions are met:
|
* This happens when a referendum needs to be tabled and one of two conditions are met:
|
||||||
@@ -552,6 +564,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The map of all accounts wishing to be unstaked.
|
* The map of all accounts wishing to be unstaked.
|
||||||
*
|
*
|
||||||
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -577,6 +591,12 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* A mapping from grandpa set ID to the index of the *most recent* session for which its
|
* A mapping from grandpa set ID to the index of the *most recent* session for which its
|
||||||
* members were responsible.
|
* members were responsible.
|
||||||
*
|
*
|
||||||
|
* This is only used for validating equivocation proofs. An equivocation proof must
|
||||||
|
* contains a key-ownership proof for a given session, therefore we need a way to tie
|
||||||
|
* together sessions and GRANDPA set ids, i.e. we need to validate that a validator
|
||||||
|
* was the owner of a given key on a given session, and what the active set ID was
|
||||||
|
* during that session.
|
||||||
|
*
|
||||||
* TWOX-NOTE: `SetId` is not under user control.
|
* TWOX-NOTE: `SetId` is not under user control.
|
||||||
**/
|
**/
|
||||||
setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||||
@@ -793,6 +813,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Storage for bonded pools.
|
* Storage for bonded pools.
|
||||||
**/
|
**/
|
||||||
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Map from a pool member account to their opted claim permission.
|
||||||
|
**/
|
||||||
|
claimPermissions: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletNominationPoolsClaimPermission>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Counter for the related counted storage map
|
* Counter for the related counted storage map
|
||||||
**/
|
**/
|
||||||
@@ -856,6 +880,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Active members.
|
* Active members.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -1129,6 +1155,11 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
parasDisputes: {
|
parasDisputes: {
|
||||||
|
/**
|
||||||
|
* Backing votes stored for each dispute.
|
||||||
|
* This storage is used for slashing.
|
||||||
|
**/
|
||||||
|
backersOnDisputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<BTreeSet<u32>>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||||
/**
|
/**
|
||||||
* All ongoing or concluded disputes for the last several sessions.
|
* All ongoing or concluded disputes for the last several sessions.
|
||||||
**/
|
**/
|
||||||
@@ -1170,6 +1201,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The earliest session for which previous session info is stored.
|
* The earliest session for which previous session info is stored.
|
||||||
**/
|
**/
|
||||||
earliestStoredSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
earliestStoredSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Executor parameter set for a given session index
|
||||||
|
**/
|
||||||
|
sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesVstagingExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Session information in a rolling window.
|
* Session information in a rolling window.
|
||||||
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
||||||
@@ -1379,6 +1414,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
activeEra: AugmentedQuery<ApiType, () => Observable<Option<PalletStakingActiveEraInfo>>, []> & QueryableStorageEntry<ApiType, []>;
|
activeEra: AugmentedQuery<ApiType, () => Observable<Option<PalletStakingActiveEraInfo>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Map from all locked "stash" accounts to the controller account.
|
* Map from all locked "stash" accounts to the controller account.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
bonded: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<AccountId32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
bonded: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<AccountId32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -1539,6 +1576,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
*
|
*
|
||||||
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
|
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
|
||||||
* [`Call::chill_other`] dispatchable by anyone.
|
* [`Call::chill_other`] dispatchable by anyone.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
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]>;
|
||||||
/**
|
/**
|
||||||
@@ -1559,6 +1598,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
offendingValidators: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, bool]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
offendingValidators: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, bool]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Where the reward payment should be made. Keyed by stash.
|
* Where the reward payment should be made. Keyed by stash.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
payee: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletStakingRewardDestination>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
payee: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletStakingRewardDestination>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -1586,6 +1627,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
validatorCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
validatorCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The map from (wannabe) validator stash key to the preferences of that validator.
|
* The map from (wannabe) validator stash key to the preferences of that validator.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
validators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletStakingValidatorPrefs>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
validators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletStakingValidatorPrefs>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -1790,6 +1833,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
ump: {
|
ump: {
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForOverweight: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry.
|
* The ordered list of `ParaId`s that have a `RelayDispatchQueue` entry.
|
||||||
*
|
*
|
||||||
@@ -1895,6 +1942,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The current migration's stage, if any.
|
* The current migration's stage, if any.
|
||||||
**/
|
**/
|
||||||
currentMigration: AugmentedQuery<ApiType, () => Observable<Option<PalletXcmVersionMigrationStage>>, []> & QueryableStorageEntry<ApiType, []>;
|
currentMigration: AugmentedQuery<ApiType, () => Observable<Option<PalletXcmVersionMigrationStage>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Fungible assets which we know are locked on this chain.
|
||||||
|
**/
|
||||||
|
lockedFungibles: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<Vec<ITuple<[u128, XcmVersionedMultiLocation]>>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* The ongoing queries.
|
* The ongoing queries.
|
||||||
**/
|
**/
|
||||||
@@ -1903,6 +1954,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The latest available query index.
|
* The latest available query index.
|
||||||
**/
|
**/
|
||||||
queryCounter: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
queryCounter: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Fungible assets which we know are locked on a remote chain.
|
||||||
|
**/
|
||||||
|
remoteLockedFungibles: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array, arg3: XcmVersionedAssetId | { V3: any } | string | Uint8Array) => Observable<Option<PalletXcmRemoteLockedFungibleRecord>>, [u32, AccountId32, XcmVersionedAssetId]> & QueryableStorageEntry<ApiType, [u32, AccountId32, XcmVersionedAssetId]>;
|
||||||
/**
|
/**
|
||||||
* Default version to encode XCM when latest version of destination is unknown. If `None`,
|
* Default version to encode XCM when latest version of destination is unknown. If `None`,
|
||||||
* then the destinations whose XCM version is unknown are considered unreachable.
|
* then the destinations whose XCM version is unknown are considered unreachable.
|
||||||
@@ -1911,7 +1966,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* The Latest versions that we know various locations support.
|
* The Latest versions that we know various locations support.
|
||||||
**/
|
**/
|
||||||
supportedVersion: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array) => Observable<Option<u32>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
supportedVersion: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V2: any } | { V3: any } | string | Uint8Array) => Observable<Option<u32>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
||||||
/**
|
/**
|
||||||
* Destinations whose latest XCM version we would like to know. Duplicates not allowed, and
|
* Destinations whose latest XCM version we would like to know. Duplicates not allowed, and
|
||||||
* the `u32` counter is the number of times that a send to the destination has been attempted,
|
* the `u32` counter is the number of times that a send to the destination has been attempted,
|
||||||
@@ -1921,12 +1976,12 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* All locations that we have requested version notifications from.
|
* All locations that we have requested version notifications from.
|
||||||
**/
|
**/
|
||||||
versionNotifiers: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array) => Observable<Option<u64>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
versionNotifiers: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V2: any } | { V3: any } | string | Uint8Array) => Observable<Option<u64>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
||||||
/**
|
/**
|
||||||
* The target locations that are subscribed to our version changes, as well as the most recent
|
* The target locations that are subscribed to our version changes, as well as the most recent
|
||||||
* of our versions we informed them of.
|
* of our versions we informed them of.
|
||||||
**/
|
**/
|
||||||
versionNotifyTargets: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array) => Observable<Option<ITuple<[u64, u64, u32]>>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
versionNotifyTargets: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: XcmVersionedMultiLocation | { V2: any } | { V3: any } | string | Uint8Array) => Observable<Option<ITuple<[u64, SpWeightsWeightV2Weight, u32]>>>, [u32, XcmVersionedMultiLocation]> & QueryableStorageEntry<ApiType, [u32, XcmVersionedMultiLocation]>;
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
|||||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||||
@@ -333,7 +333,7 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: DecoratedCallBase<ApiType>;
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
};
|
};
|
||||||
/** 0x37c8bb1350a9a2a8/2 */
|
/** 0x37c8bb1350a9a2a8/3 */
|
||||||
transactionPaymentApi: {
|
transactionPaymentApi: {
|
||||||
/**
|
/**
|
||||||
* The transaction fee details
|
* The transaction fee details
|
||||||
@@ -343,12 +343,20 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
* The transaction info
|
* The transaction info
|
||||||
**/
|
**/
|
||||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current LengthToFee given some input
|
||||||
|
**/
|
||||||
|
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current WeightToFee given some input
|
||||||
|
**/
|
||||||
|
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||||
/**
|
/**
|
||||||
* Generic call
|
* Generic call
|
||||||
**/
|
**/
|
||||||
[key: string]: DecoratedCallBase<ApiType>;
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
};
|
};
|
||||||
/** 0xf3ff14d5ab527059/2 */
|
/** 0xf3ff14d5ab527059/3 */
|
||||||
transactionPaymentCallApi: {
|
transactionPaymentCallApi: {
|
||||||
/**
|
/**
|
||||||
* The call fee details
|
* The call fee details
|
||||||
@@ -358,6 +366,14 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
* The call info
|
* The call info
|
||||||
**/
|
**/
|
||||||
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current LengthToFee given some input
|
||||||
|
**/
|
||||||
|
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current WeightToFee given some input
|
||||||
|
**/
|
||||||
|
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||||
/**
|
/**
|
||||||
* Generic call
|
* Generic call
|
||||||
**/
|
**/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -79,18 +79,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
authorship: {
|
|
||||||
/**
|
|
||||||
* The number of blocks back we should accept uncles.
|
|
||||||
* This means that we will deal with uncle-parents that are
|
|
||||||
* `UncleGenerations + 1` before `now`.
|
|
||||||
**/
|
|
||||||
uncleGenerations: u32 & AugmentedConst<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic const
|
|
||||||
**/
|
|
||||||
[key: string]: Codec;
|
|
||||||
};
|
|
||||||
babe: {
|
babe: {
|
||||||
/**
|
/**
|
||||||
* The amount of time, in slots, that each epoch should last.
|
* The amount of time, in slots, that each epoch should last.
|
||||||
@@ -243,6 +231,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* The maximum length of a contract code in bytes. This limit applies to the instrumented
|
* The maximum length of a contract code in bytes. This limit applies to the instrumented
|
||||||
* version of the code. Therefore `instantiate_with_code` can fail even when supplying
|
* version of the code. Therefore `instantiate_with_code` can fail even when supplying
|
||||||
* a wasm binary below this maximum size.
|
* a wasm binary below this maximum size.
|
||||||
|
*
|
||||||
|
* The value should be chosen carefully taking into the account the overall memory limit
|
||||||
|
* your runtime has, as well as the [maximum allowed callstack
|
||||||
|
* depth](#associatedtype.CallStack). Look into the `integrity_test()` for some insights.
|
||||||
**/
|
**/
|
||||||
maxCodeLen: u32 & AugmentedConst<ApiType>;
|
maxCodeLen: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -469,18 +461,28 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
/**
|
/**
|
||||||
* The maximum number of candidates in a phragmen election.
|
* The maximum number of candidates in a phragmen election.
|
||||||
*
|
*
|
||||||
* Warning: The election happens onchain, and this value will determine
|
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
|
||||||
* the size of the election. When this limit is reached no more
|
* consider how it will impact `T::WeightInfo::election_phragmen`.
|
||||||
* candidates are accepted in the election.
|
*
|
||||||
|
* When this limit is reached no more candidates are accepted in the election.
|
||||||
**/
|
**/
|
||||||
maxCandidates: u32 & AugmentedConst<ApiType>;
|
maxCandidates: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of voters to allow in a phragmen election.
|
* The maximum number of voters to allow in a phragmen election.
|
||||||
*
|
*
|
||||||
* Warning: This impacts the size of the election which is run onchain.
|
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
|
||||||
|
* consider how it will impact `T::WeightInfo::election_phragmen`.
|
||||||
|
*
|
||||||
* When the limit is reached the new voters are ignored.
|
* When the limit is reached the new voters are ignored.
|
||||||
**/
|
**/
|
||||||
maxVoters: u32 & AugmentedConst<ApiType>;
|
maxVoters: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum numbers of votes per voter.
|
||||||
|
*
|
||||||
|
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
|
||||||
|
* consider how it will impact `T::WeightInfo::election_phragmen`.
|
||||||
|
**/
|
||||||
|
maxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Identifier for the elections-phragmen pallet's lock
|
* Identifier for the elections-phragmen pallet's lock
|
||||||
**/
|
**/
|
||||||
@@ -523,6 +525,15 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Max Authorities in use
|
* Max Authorities in use
|
||||||
**/
|
**/
|
||||||
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum number of entries to keep in the set id to session index mapping.
|
||||||
|
*
|
||||||
|
* Since the `SetIdSession` map is only used for validating equivocations this
|
||||||
|
* value should relate to the bonding duration of whatever staking system is
|
||||||
|
* being used (if any). If equivocation handling is not enabled then this value
|
||||||
|
* can be zero.
|
||||||
|
**/
|
||||||
|
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Generic const
|
* Generic const
|
||||||
**/
|
**/
|
||||||
@@ -692,6 +703,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* The maximum length of an attribute key.
|
* The maximum length of an attribute key.
|
||||||
**/
|
**/
|
||||||
keyLimit: u32 & AugmentedConst<ApiType>;
|
keyLimit: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The max number of attributes a user could set per call.
|
||||||
|
**/
|
||||||
|
maxAttributesPerCall: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The max duration in blocks for deadlines.
|
* The max duration in blocks for deadlines.
|
||||||
**/
|
**/
|
||||||
@@ -771,6 +786,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* this value multiplied by `Period`.
|
* this value multiplied by `Period`.
|
||||||
**/
|
**/
|
||||||
queueCount: u32 & AugmentedConst<ApiType>;
|
queueCount: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The name for the reserve ID.
|
||||||
|
**/
|
||||||
|
reserveId: U8aFixed & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum proportion which may be thawed and the period over which it is reset.
|
* The maximum proportion which may be thawed and the period over which it is reset.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -245,40 +245,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
authorship: {
|
|
||||||
/**
|
|
||||||
* The uncle is genesis.
|
|
||||||
**/
|
|
||||||
GenesisUncle: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle parent not in the chain.
|
|
||||||
**/
|
|
||||||
InvalidUncleParent: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle isn't recent enough to be included.
|
|
||||||
**/
|
|
||||||
OldUncle: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle is too high in chain.
|
|
||||||
**/
|
|
||||||
TooHighUncle: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Too many uncles.
|
|
||||||
**/
|
|
||||||
TooManyUncles: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* The uncle is already included.
|
|
||||||
**/
|
|
||||||
UncleAlreadyIncluded: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Uncles already set in the block.
|
|
||||||
**/
|
|
||||||
UnclesAlreadySet: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic error
|
|
||||||
**/
|
|
||||||
[key: string]: AugmentedError<ApiType>;
|
|
||||||
};
|
|
||||||
babe: {
|
babe: {
|
||||||
/**
|
/**
|
||||||
* A given equivocation report is valid but already previously reported.
|
* A given equivocation report is valid but already previously reported.
|
||||||
@@ -448,10 +414,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Contract trapped during execution.
|
* Contract trapped during execution.
|
||||||
**/
|
**/
|
||||||
ContractTrapped: AugmentedError<ApiType>;
|
ContractTrapped: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* The debug message specified to `seal_debug_message` does contain invalid UTF-8.
|
|
||||||
**/
|
|
||||||
DebugMessageInvalidUTF8: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Input passed to a contract API function failed to decode as expected type.
|
* Input passed to a contract API function failed to decode as expected type.
|
||||||
**/
|
**/
|
||||||
@@ -714,6 +676,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The given account did not vote on the referendum.
|
* The given account did not vote on the referendum.
|
||||||
**/
|
**/
|
||||||
NotVoter: AugmentedError<ApiType>;
|
NotVoter: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The preimage does not exist.
|
||||||
|
**/
|
||||||
|
PreimageNotExist: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Proposal still blacklisted
|
* Proposal still blacklisted
|
||||||
**/
|
**/
|
||||||
@@ -920,6 +886,18 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
glutton: {
|
||||||
|
/**
|
||||||
|
* The pallet was already initialized.
|
||||||
|
*
|
||||||
|
* Set `witness_count` to `Some` to bypass this error.
|
||||||
|
**/
|
||||||
|
AlreadyInitialized: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* Attempt to signal GRANDPA change with one already pending.
|
* Attempt to signal GRANDPA change with one already pending.
|
||||||
@@ -1134,6 +1112,13 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The message is queued for future execution.
|
* The message is queued for future execution.
|
||||||
**/
|
**/
|
||||||
Queued: AugmentedError<ApiType>;
|
Queued: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* This message is temporarily unprocessable.
|
||||||
|
*
|
||||||
|
* Such errors are expected, but not guaranteed, to resolve themselves eventually through
|
||||||
|
* retrying.
|
||||||
|
**/
|
||||||
|
TemporarilyUnprocessable: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Generic error
|
* Generic error
|
||||||
**/
|
**/
|
||||||
@@ -1242,6 +1227,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The provided data is incorrect.
|
* The provided data is incorrect.
|
||||||
**/
|
**/
|
||||||
IncorrectData: AugmentedError<ApiType>;
|
IncorrectData: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided metadata might be too long.
|
||||||
|
**/
|
||||||
|
IncorrectMetadata: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The item is locked (non-transferable).
|
* The item is locked (non-transferable).
|
||||||
**/
|
**/
|
||||||
@@ -1266,6 +1255,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Item's metadata is locked.
|
* Item's metadata is locked.
|
||||||
**/
|
**/
|
||||||
LockedItemMetadata: AugmentedError<ApiType>;
|
LockedItemMetadata: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Can't set more attributes per one call.
|
||||||
|
**/
|
||||||
|
MaxAttributesLimitReached: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The max supply is locked and can't be changed.
|
* The max supply is locked and can't be changed.
|
||||||
**/
|
**/
|
||||||
@@ -1346,6 +1339,14 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The duration provided should be less than or equal to `MaxDeadlineDuration`.
|
* The duration provided should be less than or equal to `MaxDeadlineDuration`.
|
||||||
**/
|
**/
|
||||||
WrongDuration: AugmentedError<ApiType>;
|
WrongDuration: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided namespace isn't supported in this call.
|
||||||
|
**/
|
||||||
|
WrongNamespace: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The extrinsic was sent by the wrong origin.
|
||||||
|
**/
|
||||||
|
WrongOrigin: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The owner turned out to be different to what was expected.
|
* The owner turned out to be different to what was expected.
|
||||||
**/
|
**/
|
||||||
@@ -1354,12 +1355,28 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The provided setting can't be set.
|
* The provided setting can't be set.
|
||||||
**/
|
**/
|
||||||
WrongSetting: AugmentedError<ApiType>;
|
WrongSetting: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided signature is incorrect.
|
||||||
|
**/
|
||||||
|
WrongSignature: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Generic error
|
* Generic error
|
||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
nis: {
|
nis: {
|
||||||
|
/**
|
||||||
|
* The receipt is already communal.
|
||||||
|
**/
|
||||||
|
AlreadyCommunal: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* There are enough funds for what is required.
|
||||||
|
**/
|
||||||
|
AlreadyFunded: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The receipt is already private.
|
||||||
|
**/
|
||||||
|
AlreadyPrivate: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The amount of the bid is less than the minimum allowed.
|
* The amount of the bid is less than the minimum allowed.
|
||||||
**/
|
**/
|
||||||
@@ -1377,10 +1394,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The duration of the bid is less than one.
|
* The duration of the bid is less than one.
|
||||||
**/
|
**/
|
||||||
DurationTooSmall: AugmentedError<ApiType>;
|
DurationTooSmall: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* There are enough funds for what is required.
|
|
||||||
**/
|
|
||||||
Funded: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* The operation would result in a receipt worth an insignficant value.
|
* The operation would result in a receipt worth an insignficant value.
|
||||||
**/
|
**/
|
||||||
@@ -1389,30 +1402,30 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Bond not yet at expiry date.
|
* Bond not yet at expiry date.
|
||||||
**/
|
**/
|
||||||
NotExpired: AugmentedError<ApiType>;
|
NotExpired: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* The given bid for retraction is not found.
|
|
||||||
**/
|
|
||||||
NotFound: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Not the owner of the receipt.
|
* Not the owner of the receipt.
|
||||||
**/
|
**/
|
||||||
NotOwner: AugmentedError<ApiType>;
|
NotOwner: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The portion supplied is beyond the value of the receipt.
|
||||||
|
**/
|
||||||
|
PortionTooBig: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The thaw throttle has been reached for this period.
|
* The thaw throttle has been reached for this period.
|
||||||
**/
|
**/
|
||||||
Throttled: AugmentedError<ApiType>;
|
Throttled: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* The portion supplied is beyond the value of the receipt.
|
|
||||||
**/
|
|
||||||
TooMuch: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Not enough funds are held to pay out.
|
* Not enough funds are held to pay out.
|
||||||
**/
|
**/
|
||||||
Unfunded: AugmentedError<ApiType>;
|
Unfunded: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Bond index is unknown.
|
* The given bid for retraction is not found.
|
||||||
**/
|
**/
|
||||||
Unknown: AugmentedError<ApiType>;
|
UnknownBid: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Receipt index is unknown.
|
||||||
|
**/
|
||||||
|
UnknownReceipt: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Generic error
|
* Generic error
|
||||||
**/
|
**/
|
||||||
@@ -1424,6 +1437,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* pool at a time.
|
* pool at a time.
|
||||||
**/
|
**/
|
||||||
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Bonding extra is restricted to the exact pending reward amount.
|
||||||
|
**/
|
||||||
|
BondExtraRestricted: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The pools state cannot be changed.
|
* The pools state cannot be changed.
|
||||||
**/
|
**/
|
||||||
@@ -1675,6 +1692,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* No track exists for the proposal origin.
|
* No track exists for the proposal origin.
|
||||||
**/
|
**/
|
||||||
NoTrack: AugmentedError<ApiType>;
|
NoTrack: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The preimage does not exist.
|
||||||
|
**/
|
||||||
|
PreimageNotExist: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The queue of the track is empty.
|
* The queue of the track is empty.
|
||||||
**/
|
**/
|
||||||
@@ -1799,6 +1820,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* No track exists for the proposal origin.
|
* No track exists for the proposal origin.
|
||||||
**/
|
**/
|
||||||
NoTrack: AugmentedError<ApiType>;
|
NoTrack: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The preimage does not exist.
|
||||||
|
**/
|
||||||
|
PreimageNotExist: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The queue of the track is empty.
|
* The queue of the track is empty.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
|
|||||||
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscAttributeNamespace, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMessageQueueMockHelpersMessageOrigin, PalletMultisigTimepoint, PalletNftsPriceWithDirection, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscAttributeNamespace, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNftsPriceWithDirection, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* Some assets were issued.
|
* Some assets were issued.
|
||||||
**/
|
**/
|
||||||
Issued: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, totalSupply: u128], { assetId: u32, owner: AccountId32, totalSupply: u128 }>;
|
Issued: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, amount: u128], { assetId: u32, owner: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Metadata has been cleared for an asset.
|
* Metadata has been cleared for an asset.
|
||||||
**/
|
**/
|
||||||
@@ -437,6 +437,18 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* An external proposal has been tabled.
|
* An external proposal has been tabled.
|
||||||
**/
|
**/
|
||||||
ExternalTabled: AugmentedEvent<ApiType, []>;
|
ExternalTabled: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Metadata for a proposal or a referendum has been cleared.
|
||||||
|
**/
|
||||||
|
MetadataCleared: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a proposal or a referendum has been set.
|
||||||
|
**/
|
||||||
|
MetadataSet: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
|
||||||
|
/**
|
||||||
|
* Metadata has been transferred to new owner.
|
||||||
|
**/
|
||||||
|
MetadataTransferred: AugmentedEvent<ApiType, [prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256], { prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal has been rejected by referendum.
|
* A proposal has been rejected by referendum.
|
||||||
**/
|
**/
|
||||||
@@ -569,12 +581,12 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
BatchChecked: AugmentedEvent<ApiType, [eras: Vec<u32>], { eras: Vec<u32> }>;
|
BatchChecked: AugmentedEvent<ApiType, [eras: Vec<u32>], { eras: Vec<u32> }>;
|
||||||
/**
|
/**
|
||||||
* A batch was terminated.
|
* A batch of a given size was terminated.
|
||||||
*
|
*
|
||||||
* This is always follows by a number of `Unstaked` or `Slashed` events, marking the end
|
* This is always follows by a number of `Unstaked` or `Slashed` events, marking the end
|
||||||
* of the batch. A new batch will be created upon next block.
|
* of the batch. A new batch will be created upon next block.
|
||||||
**/
|
**/
|
||||||
BatchFinished: AugmentedEvent<ApiType, []>;
|
BatchFinished: AugmentedEvent<ApiType, [size_: u32], { size_: u32 }>;
|
||||||
/**
|
/**
|
||||||
* An internal error happened. Operations will be paused now.
|
* An internal error happened. Operations will be paused now.
|
||||||
**/
|
**/
|
||||||
@@ -592,6 +604,24 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
glutton: {
|
||||||
|
/**
|
||||||
|
* The computation limit has been updated by root.
|
||||||
|
**/
|
||||||
|
ComputationLimitSet: AugmentedEvent<ApiType, [compute: Perbill], { compute: Perbill }>;
|
||||||
|
/**
|
||||||
|
* The pallet has been (re)initialized by root.
|
||||||
|
**/
|
||||||
|
PalletInitialized: AugmentedEvent<ApiType, [reinit: bool], { reinit: bool }>;
|
||||||
|
/**
|
||||||
|
* The storage limit has been updated by root.
|
||||||
|
**/
|
||||||
|
StorageLimitSet: AugmentedEvent<ApiType, [storage: Perbill], { storage: Perbill }>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* New authority set has been applied.
|
* New authority set has been applied.
|
||||||
@@ -724,19 +754,19 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* Message placed in overweight queue.
|
* Message placed in overweight queue.
|
||||||
**/
|
**/
|
||||||
OverweightEnqueued: AugmentedEvent<ApiType, [hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, pageIndex: u32, messageIndex: u32], { hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, pageIndex: u32, messageIndex: u32 }>;
|
OverweightEnqueued: AugmentedEvent<ApiType, [hash_: H256, origin: u32, pageIndex: u32, messageIndex: u32], { hash_: H256, origin: u32, pageIndex: u32, messageIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* This page was reaped.
|
* This page was reaped.
|
||||||
**/
|
**/
|
||||||
PageReaped: AugmentedEvent<ApiType, [origin: PalletMessageQueueMockHelpersMessageOrigin, index: u32], { origin: PalletMessageQueueMockHelpersMessageOrigin, index: u32 }>;
|
PageReaped: AugmentedEvent<ApiType, [origin: u32, index: u32], { origin: u32, index: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Message is processed.
|
* Message is processed.
|
||||||
**/
|
**/
|
||||||
Processed: AugmentedEvent<ApiType, [hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, weightUsed: SpWeightsWeightV2Weight, success: bool], { hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, weightUsed: SpWeightsWeightV2Weight, success: bool }>;
|
Processed: AugmentedEvent<ApiType, [hash_: H256, origin: u32, weightUsed: SpWeightsWeightV2Weight, success: bool], { hash_: H256, origin: u32, weightUsed: SpWeightsWeightV2Weight, success: bool }>;
|
||||||
/**
|
/**
|
||||||
* Message discarded due to an error in the `MessageProcessor` (usually a format error).
|
* Message discarded due to an error in the `MessageProcessor` (usually a format error).
|
||||||
**/
|
**/
|
||||||
ProcessingFailed: AugmentedEvent<ApiType, [hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, error: FrameSupportMessagesProcessMessageError], { hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, error: FrameSupportMessagesProcessMessageError }>;
|
ProcessingFailed: AugmentedEvent<ApiType, [hash_: H256, origin: u32, error: FrameSupportMessagesProcessMessageError], { hash_: H256, origin: u32, error: FrameSupportMessagesProcessMessageError }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -878,6 +908,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* Ownership acceptance has changed for an account.
|
* Ownership acceptance has changed for an account.
|
||||||
**/
|
**/
|
||||||
OwnershipAcceptanceChanged: AugmentedEvent<ApiType, [who: AccountId32, maybeCollection: Option<u32>], { who: AccountId32, maybeCollection: Option<u32> }>;
|
OwnershipAcceptanceChanged: AugmentedEvent<ApiType, [who: AccountId32, maybeCollection: Option<u32>], { who: AccountId32, maybeCollection: Option<u32> }>;
|
||||||
|
/**
|
||||||
|
* New attributes have been set for an `item` of the `collection`.
|
||||||
|
**/
|
||||||
|
PreSignedAttributesSet: AugmentedEvent<ApiType, [collection: u32, item: u32, namespace: FrameSupportTokensMiscAttributeNamespace], { collection: u32, item: u32, namespace: FrameSupportTokensMiscAttributeNamespace }>;
|
||||||
/**
|
/**
|
||||||
* The deposit for a set of `item`s within a `collection` has been updated.
|
* The deposit for a set of `item`s within a `collection` has been updated.
|
||||||
**/
|
**/
|
||||||
@@ -981,7 +1015,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* The roles of a pool have been updated to the given new roles. Note that the depositor
|
* The roles of a pool have been updated to the given new roles. Note that the depositor
|
||||||
* can never change.
|
* can never change.
|
||||||
**/
|
**/
|
||||||
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32> }>;
|
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32> }>;
|
||||||
/**
|
/**
|
||||||
* The state of a pool has changed
|
* The state of a pool has changed
|
||||||
**/
|
**/
|
||||||
@@ -1030,6 +1064,13 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
pov: {
|
||||||
|
TestEvent: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
preimage: {
|
preimage: {
|
||||||
/**
|
/**
|
||||||
* A preimage has ben cleared.
|
* A preimage has ben cleared.
|
||||||
@@ -1133,6 +1174,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A referendum has been killed.
|
* A referendum has been killed.
|
||||||
**/
|
**/
|
||||||
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
|
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a referendum has been cleared.
|
||||||
|
**/
|
||||||
|
MetadataCleared: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a referendum has been set.
|
||||||
|
**/
|
||||||
|
MetadataSet: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal has been rejected by referendum.
|
* A proposal has been rejected by referendum.
|
||||||
**/
|
**/
|
||||||
@@ -1219,6 +1268,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A referendum has been killed.
|
* A referendum has been killed.
|
||||||
**/
|
**/
|
||||||
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
|
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a referendum has been cleared.
|
||||||
|
**/
|
||||||
|
MetadataCleared: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
|
||||||
|
/**
|
||||||
|
* Metadata for a referendum has been set.
|
||||||
|
**/
|
||||||
|
MetadataSet: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal has been rejected by referendum.
|
* A proposal has been rejected by referendum.
|
||||||
**/
|
**/
|
||||||
@@ -1334,6 +1391,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A new \[max\] member count has been set
|
* A new \[max\] member count has been set
|
||||||
**/
|
**/
|
||||||
NewMaxMembers: AugmentedEvent<ApiType, [max: u32], { max: u32 }>;
|
NewMaxMembers: AugmentedEvent<ApiType, [max: u32], { max: u32 }>;
|
||||||
|
/**
|
||||||
|
* A group of members has been choosen as Skeptics
|
||||||
|
**/
|
||||||
|
SkepticsChosen: AugmentedEvent<ApiType, [skeptics: Vec<AccountId32>], { skeptics: Vec<AccountId32> }>;
|
||||||
/**
|
/**
|
||||||
* A suspended member has been judged.
|
* A suspended member has been judged.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
|
|||||||
import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSupportTokensMiscAttributeNamespace, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueueMockHelpersMessageOrigin, PalletMessageQueuePage, PalletMultisigMultisig, PalletNftsAttributeDeposit, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSupportTokensMiscAttributeNamespace, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNftsAttributeDeposit, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||||
@@ -128,14 +128,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Author of current block.
|
* Author of current block.
|
||||||
**/
|
**/
|
||||||
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Whether uncles were already set in this block.
|
|
||||||
**/
|
|
||||||
didSetUncles: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
|
||||||
* Uncles
|
|
||||||
**/
|
|
||||||
uncles: AugmentedQuery<ApiType, () => Observable<Vec<PalletAuthorshipUncleEntryItem>>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -234,6 +226,17 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* epoch.
|
* epoch.
|
||||||
**/
|
**/
|
||||||
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A list of the last 100 skipped epochs and the corresponding session index
|
||||||
|
* when the epoch was skipped.
|
||||||
|
*
|
||||||
|
* This is only used for validating equivocation proofs. An equivocation proof
|
||||||
|
* must contains a key-ownership proof for a given session, therefore we need a
|
||||||
|
* way to tie together sessions and epoch indices, i.e. we need to validate that
|
||||||
|
* a validator was the owner of a given key on a given session, and what the
|
||||||
|
* active epoch index was during that session.
|
||||||
|
**/
|
||||||
|
skippedEpochs: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u64, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
|
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
|
||||||
**/
|
**/
|
||||||
@@ -471,6 +474,15 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* `ReferendumCount` if there isn't a unbaked referendum.
|
* `ReferendumCount` if there isn't a unbaked referendum.
|
||||||
**/
|
**/
|
||||||
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* General information concerning any proposal or referendum.
|
||||||
|
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
|
||||||
|
* dump or IPFS hash of a JSON file.
|
||||||
|
*
|
||||||
|
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
|
||||||
|
* large preimages.
|
||||||
|
**/
|
||||||
|
metadataOf: AugmentedQuery<ApiType, (arg: PalletDemocracyMetadataOwner | { External: any } | { Proposal: any } | { Referendum: any } | string | Uint8Array) => Observable<Option<H256>>, [PalletDemocracyMetadataOwner]> & QueryableStorageEntry<ApiType, [PalletDemocracyMetadataOwner]>;
|
||||||
/**
|
/**
|
||||||
* The referendum to be tabled whenever it would be valid to table an external proposal.
|
* The referendum to be tabled whenever it would be valid to table an external proposal.
|
||||||
* This happens when a referendum needs to be tabled and one of two conditions are met:
|
* This happens when a referendum needs to be tabled and one of two conditions are met:
|
||||||
@@ -656,6 +668,37 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
glutton: {
|
||||||
|
/**
|
||||||
|
* Storage value used to specify what percentage of the left over `ref_time`
|
||||||
|
* to consume during `on_idle`.
|
||||||
|
**/
|
||||||
|
compute: AugmentedQuery<ApiType, () => Observable<Perbill>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Storage value used the specify what percentage of left over `proof_size`
|
||||||
|
* to consume during `on_idle`.
|
||||||
|
**/
|
||||||
|
storage: AugmentedQuery<ApiType, () => Observable<Perbill>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Storage map used for wasting proof size.
|
||||||
|
*
|
||||||
|
* It contains no meaningful data - hence the name "Trash". The maximal number of entries is
|
||||||
|
* set to 65k, which is just below the next jump at 16^4. This is important to reduce the proof
|
||||||
|
* size benchmarking overestimate. The assumption here is that we won't have more than 65k *
|
||||||
|
* 1KiB = 65MiB of proof size wasting in practice. However, this limit is not enforced, so the
|
||||||
|
* pallet would also work out of the box with more entries, but its benchmarked proof weight
|
||||||
|
* would possibly be underestimated in that case.
|
||||||
|
**/
|
||||||
|
trashData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<U8aFixed>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* The current number of entries in `TrashData`.
|
||||||
|
**/
|
||||||
|
trashDataCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* The number of changes (both in terms of keys and underlying economic responsibilities)
|
* The number of changes (both in terms of keys and underlying economic responsibilities)
|
||||||
@@ -674,6 +717,12 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* A mapping from grandpa set ID to the index of the *most recent* session for which its
|
* A mapping from grandpa set ID to the index of the *most recent* session for which its
|
||||||
* members were responsible.
|
* members were responsible.
|
||||||
*
|
*
|
||||||
|
* This is only used for validating equivocation proofs. An equivocation proof must
|
||||||
|
* contains a key-ownership proof for a given session, therefore we need a way to tie
|
||||||
|
* together sessions and GRANDPA set ids, i.e. we need to validate that a validator
|
||||||
|
* was the owner of a given key on a given session, and what the active set ID was
|
||||||
|
* during that session.
|
||||||
|
*
|
||||||
* TWOX-NOTE: `SetId` is not under user control.
|
* TWOX-NOTE: `SetId` is not under user control.
|
||||||
**/
|
**/
|
||||||
setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||||
@@ -801,15 +850,15 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* The index of the first and last (non-empty) pages.
|
* The index of the first and last (non-empty) pages.
|
||||||
**/
|
**/
|
||||||
bookStateFor: AugmentedQuery<ApiType, (arg: PalletMessageQueueMockHelpersMessageOrigin | { Here: any } | { There: any } | { Everywhere: any } | string | Uint8Array) => Observable<PalletMessageQueueBookState>, [PalletMessageQueueMockHelpersMessageOrigin]> & QueryableStorageEntry<ApiType, [PalletMessageQueueMockHelpersMessageOrigin]>;
|
bookStateFor: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PalletMessageQueueBookState>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The map of page indices to pages.
|
* The map of page indices to pages.
|
||||||
**/
|
**/
|
||||||
pages: AugmentedQuery<ApiType, (arg1: PalletMessageQueueMockHelpersMessageOrigin | { Here: any } | { There: any } | { Everywhere: any } | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletMessageQueuePage>>, [PalletMessageQueueMockHelpersMessageOrigin, u32]> & QueryableStorageEntry<ApiType, [PalletMessageQueueMockHelpersMessageOrigin, u32]>;
|
pages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletMessageQueuePage>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* The origin at which we should begin servicing.
|
* The origin at which we should begin servicing.
|
||||||
**/
|
**/
|
||||||
serviceHead: AugmentedQuery<ApiType, () => Observable<Option<PalletMessageQueueMockHelpersMessageOrigin>>, []> & QueryableStorageEntry<ApiType, []>;
|
serviceHead: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -947,6 +996,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Storage for bonded pools.
|
* Storage for bonded pools.
|
||||||
**/
|
**/
|
||||||
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Map from a pool member account to their opted claim permission.
|
||||||
|
**/
|
||||||
|
claimPermissions: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletNominationPoolsClaimPermission>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Counter for the related counted storage map
|
* Counter for the related counted storage map
|
||||||
**/
|
**/
|
||||||
@@ -1059,6 +1112,38 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
pov: {
|
||||||
|
/**
|
||||||
|
* A value with a MEL bound of 32 byte.
|
||||||
|
**/
|
||||||
|
boundedValue: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
doubleMap1M: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||||
|
/**
|
||||||
|
* 4MiB value.
|
||||||
|
**/
|
||||||
|
largeValue: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
largeValue2: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A map with a maximum of 16M entries.
|
||||||
|
**/
|
||||||
|
map16M: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* A map with a maximum of 1M entries.
|
||||||
|
**/
|
||||||
|
map1M: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
unboundedMap: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<u32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
unboundedMap2: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<u32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* A value without a MEL bound.
|
||||||
|
**/
|
||||||
|
unboundedValue: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
value: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
value2: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
preimage: {
|
preimage: {
|
||||||
preimageFor: AugmentedQuery<ApiType, (arg: ITuple<[H256, u32]> | [H256 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<Bytes>>, [ITuple<[H256, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[H256, u32]>]>;
|
preimageFor: AugmentedQuery<ApiType, (arg: ITuple<[H256, u32]> | [H256 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<Bytes>>, [ITuple<[H256, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[H256, u32]>]>;
|
||||||
/**
|
/**
|
||||||
@@ -1131,6 +1216,15 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The number of referenda being decided currently.
|
* The number of referenda being decided currently.
|
||||||
**/
|
**/
|
||||||
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||||
|
/**
|
||||||
|
* The metadata is a general information concerning the referendum.
|
||||||
|
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
|
||||||
|
* dump or IPFS hash of a JSON file.
|
||||||
|
*
|
||||||
|
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
|
||||||
|
* large preimages.
|
||||||
|
**/
|
||||||
|
metadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<H256>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The next free referendum index, aka the number of referenda started so far.
|
* The next free referendum index, aka the number of referenda started so far.
|
||||||
**/
|
**/
|
||||||
@@ -1179,6 +1273,15 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The number of referenda being decided currently.
|
* The number of referenda being decided currently.
|
||||||
**/
|
**/
|
||||||
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||||
|
/**
|
||||||
|
* The metadata is a general information concerning the referendum.
|
||||||
|
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
|
||||||
|
* dump or IPFS hash of a JSON file.
|
||||||
|
*
|
||||||
|
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
|
||||||
|
* large preimages.
|
||||||
|
**/
|
||||||
|
metadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<H256>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The next free referendum index, aka the number of referenda started so far.
|
* The next free referendum index, aka the number of referenda started so far.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/t
|
|||||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, WeightV2 } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||||
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||||
@@ -264,7 +264,7 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: DecoratedCallBase<ApiType>;
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
};
|
};
|
||||||
/** 0x37c8bb1350a9a2a8/2 */
|
/** 0x37c8bb1350a9a2a8/3 */
|
||||||
transactionPaymentApi: {
|
transactionPaymentApi: {
|
||||||
/**
|
/**
|
||||||
* The transaction fee details
|
* The transaction fee details
|
||||||
@@ -274,12 +274,20 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
* The transaction info
|
* The transaction info
|
||||||
**/
|
**/
|
||||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current LengthToFee given some input
|
||||||
|
**/
|
||||||
|
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current WeightToFee given some input
|
||||||
|
**/
|
||||||
|
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||||
/**
|
/**
|
||||||
* Generic call
|
* Generic call
|
||||||
**/
|
**/
|
||||||
[key: string]: DecoratedCallBase<ApiType>;
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
};
|
};
|
||||||
/** 0xf3ff14d5ab527059/2 */
|
/** 0xf3ff14d5ab527059/3 */
|
||||||
transactionPaymentCallApi: {
|
transactionPaymentCallApi: {
|
||||||
/**
|
/**
|
||||||
* The call fee details
|
* The call fee details
|
||||||
@@ -289,6 +297,14 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
* The call info
|
* The call info
|
||||||
**/
|
**/
|
||||||
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current LengthToFee given some input
|
||||||
|
**/
|
||||||
|
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||||
|
/**
|
||||||
|
* Query the output of the current WeightToFee given some input
|
||||||
|
**/
|
||||||
|
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||||
/**
|
/**
|
||||||
* Generic call
|
* Generic call
|
||||||
**/
|
**/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,6 @@
|
|||||||
{ "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" }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.11.3",
|
"version": "10.0.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@polkadot/rpc-core": "10.0.1",
|
||||||
"@polkadot/rpc-core": "9.11.3",
|
"@polkadot/types": "10.0.1",
|
||||||
"@polkadot/types": "9.11.3",
|
"@polkadot/util": "^11.0.1",
|
||||||
"@polkadot/util": "^10.2.6",
|
"rxjs": "^7.8.0",
|
||||||
"rxjs": "^7.8.0"
|
"tslib": "^2.5.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.11.3' };
|
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.0.1' };
|
||||||
|
|||||||
@@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
@@ -20,20 +20,20 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.11.3",
|
"version": "10.0.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@polkadot/api": "10.0.1",
|
||||||
"@polkadot/api": "9.11.3",
|
"@polkadot/types": "10.0.1",
|
||||||
"@polkadot/types": "9.11.3",
|
"@polkadot/types-codec": "10.0.1",
|
||||||
"@polkadot/types-codec": "9.11.3",
|
"@polkadot/types-create": "10.0.1",
|
||||||
"@polkadot/types-create": "9.11.3",
|
"@polkadot/util": "^11.0.1",
|
||||||
"@polkadot/util": "^10.2.6",
|
"@polkadot/util-crypto": "^11.0.1",
|
||||||
"@polkadot/util-crypto": "^10.2.6",
|
"rxjs": "^7.8.0",
|
||||||
"rxjs": "^7.8.0"
|
"tslib": "^2.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "9.11.3",
|
"@polkadot/api-augment": "10.0.1",
|
||||||
"@polkadot/keyring": "^10.2.6"
|
"@polkadot/keyring": "^11.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { Registry } from '@polkadot/types/types';
|
import type { Registry } from '@polkadot/types/types';
|
||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'node:fs';
|
||||||
import path from 'path';
|
import path from 'node:path';
|
||||||
|
import process from 'node:process';
|
||||||
|
|
||||||
import { TypeDefInfo } from '@polkadot/types/types';
|
import { TypeDefInfo } from '@polkadot/types/types';
|
||||||
import { blake2AsHex } from '@polkadot/util-crypto';
|
import { blake2AsHex } from '@polkadot/util-crypto';
|
||||||
@@ -41,6 +45,9 @@ interface JSONAbi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME When Jest is removed with ESM tests, this should be converted to use import.meta.url
|
||||||
|
const cmpPath = path.join(process.cwd(), 'packages/api-contract/src/test/compare');
|
||||||
|
|
||||||
function stringifyInfo (key: string, value: unknown): unknown {
|
function stringifyInfo (key: string, value: unknown): unknown {
|
||||||
return key === 'info'
|
return key === 'info'
|
||||||
? TypeDefInfo[value as number]
|
? TypeDefInfo[value as number]
|
||||||
@@ -82,26 +89,26 @@ describe('Abi', (): void => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('TypeDef', (): void => {
|
describe('TypeDef', (): void => {
|
||||||
Object.keys(abis).forEach((abiName) => {
|
for (const [abiName, abiJson] of Object.entries(abis)) {
|
||||||
it(`initializes from a contract ABI (${abiName})`, (): void => {
|
it(`initializes from a contract ABI: ${abiName}`, (): void => {
|
||||||
const abi = new Abi(abis[abiName]);
|
const abi = new Abi(abiJson);
|
||||||
const json = stringifyJson(abi.registry);
|
const registryJson = stringifyJson(abi.registry);
|
||||||
const cmpPath = path.join(__dirname, `../test/compare/${abiName}.test.json`);
|
const cmpFile = path.join(cmpPath, `${abiName}.test.json`);
|
||||||
|
const cmpText = fs.readFileSync(cmpFile, 'utf-8');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
expect(JSON.parse(registryJson)).toEqual(JSON.parse(cmpText));
|
||||||
expect(JSON.parse(json)).toEqual(require(cmpPath));
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (process.env.GITHUB_REPOSITORY) {
|
if (process.env.GITHUB_REPOSITORY) {
|
||||||
console.error(json);
|
console.error(registryJson);
|
||||||
|
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.writeFileSync(cmpPath, json, { flag: 'w' });
|
fs.writeFileSync(cmpFile, registryJson, { flag: 'w' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('has the correct hash for the source', (): void => {
|
it('has the correct hash for the source', (): void => {
|
||||||
|
|||||||
@@ -75,19 +75,13 @@ function parseJson (json: Record<string, unknown>, chainProperties?: ChainProper
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class Abi {
|
export class Abi {
|
||||||
public readonly events: AbiEvent[];
|
readonly events: AbiEvent[];
|
||||||
|
readonly constructors: AbiConstructor[];
|
||||||
public readonly constructors: AbiConstructor[];
|
readonly info: ContractProjectInfo;
|
||||||
|
readonly json: Record<string, unknown>;
|
||||||
public readonly info: ContractProjectInfo;
|
readonly messages: AbiMessage[];
|
||||||
|
readonly metadata: ContractMetadataLatest;
|
||||||
public readonly json: Record<string, unknown>;
|
readonly registry: Registry;
|
||||||
|
|
||||||
public readonly messages: AbiMessage[];
|
|
||||||
|
|
||||||
public readonly metadata: ContractMetadataLatest;
|
|
||||||
|
|
||||||
public readonly registry: Registry;
|
|
||||||
|
|
||||||
constructor (abiJson: Record<string, unknown> | string, chainProperties?: ChainProperties) {
|
constructor (abiJson: Record<string, unknown> | string, chainProperties?: ChainProperties) {
|
||||||
[this.json, this.registry, this.metadata, this.info] = parseJson(
|
[this.json, this.registry, this.metadata, this.info] = parseJson(
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { TypeRegistry } from '@polkadot/types';
|
import { TypeRegistry } from '@polkadot/types';
|
||||||
|
|
||||||
import abis from '../test/contracts';
|
import abis from '../test/contracts';
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { v3ToV4 } from './toV4';
|
|||||||
|
|
||||||
// The versions where an enum is used, aka V0 is missing
|
// The versions where an enum is used, aka V0 is missing
|
||||||
// (Order from newest, i.e. we expect more on newest vs oldest)
|
// (Order from newest, i.e. we expect more on newest vs oldest)
|
||||||
export const enumVersions = <const> ['V4', 'V3', 'V2', 'V1'];
|
export const enumVersions = ['V4', 'V3', 'V2', 'V1'] as const;
|
||||||
|
|
||||||
type Versions = typeof enumVersions[number] | 'V0';
|
type Versions = typeof enumVersions[number] | 'V0';
|
||||||
|
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ interface ArgsEntry <T extends WithArgs> extends NamedEntry {
|
|||||||
args: GetArgsType<T>['args'][0][];
|
args: GetArgsType<T>['args'][0][];
|
||||||
}
|
}
|
||||||
|
|
||||||
const ARG_TYPES = <const> {
|
const ARG_TYPES = {
|
||||||
ContractConstructorSpec: 'ContractMessageParamSpecV2',
|
ContractConstructorSpec: 'ContractMessageParamSpecV2',
|
||||||
ContractEventSpec: 'ContractEventParamSpecV2',
|
ContractEventSpec: 'ContractEventParamSpecV2',
|
||||||
ContractMessageSpec: 'ContractMessageParamSpecV2'
|
ContractMessageSpec: 'ContractMessageParamSpecV2'
|
||||||
};
|
} as const;
|
||||||
|
|
||||||
function v1ToV2Label (entry: NamedEntry): { label: Text } {
|
function v1ToV2Label (entry: NamedEntry): { label: Text } {
|
||||||
return objectSpread({}, entry, {
|
return objectSpread({}, entry, {
|
||||||
|
|||||||
@@ -11,12 +11,10 @@ import { isFunction } from '@polkadot/util';
|
|||||||
import { Abi } from '../Abi';
|
import { Abi } from '../Abi';
|
||||||
|
|
||||||
export abstract class Base<ApiType extends ApiTypes> {
|
export abstract class Base<ApiType extends ApiTypes> {
|
||||||
public readonly abi: Abi;
|
readonly abi: Abi;
|
||||||
|
readonly api: ApiBase<ApiType>;
|
||||||
public readonly api: ApiBase<ApiType>;
|
|
||||||
|
|
||||||
protected readonly _decorateMethod: DecorateMethod<ApiType>;
|
protected readonly _decorateMethod: DecorateMethod<ApiType>;
|
||||||
|
|
||||||
protected readonly _isWeightV1: boolean;
|
protected readonly _isWeightV1: boolean;
|
||||||
|
|
||||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, decorateMethod: DecorateMethod<ApiType>) {
|
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, decorateMethod: DecorateMethod<ApiType>) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export interface BlueprintConstructor<ApiType extends ApiTypes> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class BlueprintSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
|
export class BlueprintSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
|
||||||
public readonly contract?: Contract<ApiType>;
|
readonly contract?: Contract<ApiType>;
|
||||||
|
|
||||||
constructor (result: ISubmittableResult, contract?: Contract<ApiType>) {
|
constructor (result: ISubmittableResult, contract?: Contract<ApiType>) {
|
||||||
super(result);
|
super(result);
|
||||||
@@ -36,7 +36,7 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
|
|||||||
/**
|
/**
|
||||||
* @description The on-chain code hash for this blueprint
|
* @description The on-chain code hash for this blueprint
|
||||||
*/
|
*/
|
||||||
public readonly codeHash: Hash;
|
readonly codeHash: Hash;
|
||||||
|
|
||||||
readonly #tx: MapConstructorExec<ApiType> = {};
|
readonly #tx: MapConstructorExec<ApiType> = {};
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import fs from 'fs';
|
// eslint-disable-next-line spaced-comment
|
||||||
import path from 'path';
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
|
import fs from 'node:fs';
|
||||||
|
import path from 'node:path';
|
||||||
|
import process from 'node:process';
|
||||||
|
|
||||||
import { toPromiseMethod } from '@polkadot/api';
|
import { toPromiseMethod } from '@polkadot/api';
|
||||||
|
|
||||||
@@ -12,7 +16,8 @@ import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' a
|
|||||||
import { Code } from './Code';
|
import { Code } from './Code';
|
||||||
import { mockApi } from './mock';
|
import { mockApi } from './mock';
|
||||||
|
|
||||||
const v0wasmFlipper = fs.readFileSync(path.join(__dirname, '../test/contracts/ink/v0/flipper.wasm'));
|
// FIXME When Jest is removed with ESM tests, this should be converted to use import.meta.url
|
||||||
|
const v0wasmFlipper = fs.readFileSync(path.join(process.cwd(), 'packages/api-contract/src/test/contracts/ink/v0/flipper.wasm'), 'utf-8');
|
||||||
|
|
||||||
describe('Code', (): void => {
|
describe('Code', (): void => {
|
||||||
it('can construct with an individual ABI/WASM combo', (): void => {
|
it('can construct with an individual ABI/WASM combo', (): void => {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ export interface CodeConstructor<ApiType extends ApiTypes> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
|
export class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
|
||||||
public readonly blueprint?: Blueprint<ApiType>;
|
readonly blueprint?: Blueprint<ApiType>;
|
||||||
public readonly contract?: Contract<ApiType>;
|
readonly contract?: Contract<ApiType>;
|
||||||
|
|
||||||
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType>, contract?: Contract<ApiType>) {
|
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType>, contract?: Contract<ApiType>) {
|
||||||
super(result);
|
super(result);
|
||||||
@@ -37,7 +37,7 @@ export class CodeSubmittableResult<ApiType extends ApiTypes> extends Submittable
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||||
public readonly code: Uint8Array;
|
readonly code: Uint8Array;
|
||||||
|
|
||||||
readonly #tx: MapConstructorExec<ApiType> = {};
|
readonly #tx: MapConstructorExec<ApiType> = {};
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ function createTx <ApiType extends ApiTypes> (meta: AbiMessage, fn: (options: Co
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class ContractSubmittableResult extends SubmittableResult {
|
export class ContractSubmittableResult extends SubmittableResult {
|
||||||
public readonly contractEvents?: DecodedEvent[];
|
readonly contractEvents?: DecodedEvent[];
|
||||||
|
|
||||||
constructor (result: ISubmittableResult, contractEvents?: DecodedEvent[]) {
|
constructor (result: ISubmittableResult, contractEvents?: DecodedEvent[]) {
|
||||||
super(result);
|
super(result);
|
||||||
@@ -55,10 +55,9 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
|||||||
/**
|
/**
|
||||||
* @description The on-chain address for this contract
|
* @description The on-chain address for this contract
|
||||||
*/
|
*/
|
||||||
public readonly address: AccountId;
|
readonly address: AccountId;
|
||||||
|
|
||||||
readonly #query: MapMessageQuery<ApiType> = {};
|
readonly #query: MapMessageQuery<ApiType> = {};
|
||||||
|
|
||||||
readonly #tx: MapMessageTx<ApiType> = {};
|
readonly #tx: MapMessageTx<ApiType> = {};
|
||||||
|
|
||||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId, decorateMethod: DecorateMethod<ApiType>) {
|
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId, decorateMethod: DecorateMethod<ApiType>) {
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.11.3' };
|
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.0.1' };
|
||||||
|
|||||||
@@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
@@ -20,25 +20,25 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.11.3",
|
"version": "10.0.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@polkadot/api": "10.0.1",
|
||||||
"@polkadot/api": "9.11.3",
|
"@polkadot/api-augment": "10.0.1",
|
||||||
"@polkadot/api-augment": "9.11.3",
|
"@polkadot/api-base": "10.0.1",
|
||||||
"@polkadot/api-base": "9.11.3",
|
"@polkadot/rpc-core": "10.0.1",
|
||||||
"@polkadot/rpc-core": "9.11.3",
|
"@polkadot/types": "10.0.1",
|
||||||
"@polkadot/types": "9.11.3",
|
"@polkadot/types-codec": "10.0.1",
|
||||||
"@polkadot/types-codec": "9.11.3",
|
"@polkadot/util": "^11.0.1",
|
||||||
"@polkadot/util": "^10.2.6",
|
"@polkadot/util-crypto": "^11.0.1",
|
||||||
"@polkadot/util-crypto": "^10.2.6",
|
"rxjs": "^7.8.0",
|
||||||
"rxjs": "^7.8.0"
|
"tslib": "^2.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api": "9.11.3",
|
"@polkadot/api": "10.0.1",
|
||||||
"@polkadot/api-augment": "9.11.3",
|
"@polkadot/api-augment": "10.0.1",
|
||||||
"@polkadot/rpc-augment": "9.11.3",
|
"@polkadot/rpc-augment": "10.0.1",
|
||||||
"@polkadot/rpc-provider": "9.11.3",
|
"@polkadot/rpc-provider": "10.0.1",
|
||||||
"@polkadot/types-support": "9.11.3"
|
"@polkadot/types-support": "10.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { SubmittableExtrinsic } from '@polkadot/api-base/types';
|
import type { SubmittableExtrinsic } from '@polkadot/api-base/types';
|
||||||
import type { Bytes, Option, StorageKey } from '@polkadot/types';
|
import type { Bytes, Option, StorageKey } from '@polkadot/types';
|
||||||
import type { Bounty, BountyIndex, Proposal, ProposalIndex } from '@polkadot/types/interfaces';
|
import type { Bounty, BountyIndex, Proposal, ProposalIndex } from '@polkadot/types/interfaces';
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||||
@@ -27,19 +30,22 @@ const testFunction = (api: ApiRx): any => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function waitReady (api: ApiRx): Promise<ApiRx> {
|
||||||
|
return new Promise<ApiRx>((resolve) =>
|
||||||
|
api.isReady.subscribe((api) => resolve(api))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
describe('derive', (): void => {
|
describe('derive', (): void => {
|
||||||
const registry = new TypeRegistry();
|
const registry = new TypeRegistry();
|
||||||
|
|
||||||
describe('builtin', (): void => {
|
describe('builtin', (): void => {
|
||||||
const api = new ApiRx({ provider: new MockProvider(registry), registry });
|
const api = new ApiRx({ provider: new MockProvider(registry), registry });
|
||||||
|
|
||||||
beforeAll((done): void => {
|
beforeAll(async () => {
|
||||||
api.isReady.subscribe(() => done());
|
await waitReady(api);
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async () => {
|
|
||||||
await api.disconnect();
|
|
||||||
});
|
});
|
||||||
|
afterAll(() => api.disconnect());
|
||||||
|
|
||||||
testFunction(api)('accounts', 'idAndIndex', []);
|
testFunction(api)('accounts', 'idAndIndex', []);
|
||||||
testFunction(api)('accounts', 'idToIndex', []);
|
testFunction(api)('accounts', 'idToIndex', []);
|
||||||
@@ -81,13 +87,10 @@ describe('derive', (): void => {
|
|||||||
throwOnConnect: true
|
throwOnConnect: true
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeAll((done): void => {
|
beforeAll(async () => {
|
||||||
api.isReady.subscribe(() => done());
|
await waitReady(api);
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async () => {
|
|
||||||
await api.disconnect();
|
|
||||||
});
|
});
|
||||||
|
afterAll(() => api.disconnect());
|
||||||
|
|
||||||
// override
|
// override
|
||||||
testFunction(api)('balances', 'fees', ['a', 'b']);
|
testFunction(api)('balances', 'fees', ['a', 'b']);
|
||||||
|
|||||||
@@ -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: '9.11.3' };
|
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '10.0.1' };
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { ApprovalFlag } from '@polkadot/types/interfaces';
|
import type { ApprovalFlag } from '@polkadot/types/interfaces';
|
||||||
|
|
||||||
import { TypeRegistry } from '@polkadot/types/create';
|
import { TypeRegistry } from '@polkadot/types/create';
|
||||||
|
|||||||
@@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
+20
-20
@@ -20,29 +20,29 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.11.3",
|
"version": "10.0.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@polkadot/api-augment": "10.0.1",
|
||||||
"@polkadot/api-augment": "9.11.3",
|
"@polkadot/api-base": "10.0.1",
|
||||||
"@polkadot/api-base": "9.11.3",
|
"@polkadot/api-derive": "10.0.1",
|
||||||
"@polkadot/api-derive": "9.11.3",
|
"@polkadot/keyring": "^11.0.1",
|
||||||
"@polkadot/keyring": "^10.2.6",
|
"@polkadot/rpc-augment": "10.0.1",
|
||||||
"@polkadot/rpc-augment": "9.11.3",
|
"@polkadot/rpc-core": "10.0.1",
|
||||||
"@polkadot/rpc-core": "9.11.3",
|
"@polkadot/rpc-provider": "10.0.1",
|
||||||
"@polkadot/rpc-provider": "9.11.3",
|
"@polkadot/types": "10.0.1",
|
||||||
"@polkadot/types": "9.11.3",
|
"@polkadot/types-augment": "10.0.1",
|
||||||
"@polkadot/types-augment": "9.11.3",
|
"@polkadot/types-codec": "10.0.1",
|
||||||
"@polkadot/types-codec": "9.11.3",
|
"@polkadot/types-create": "10.0.1",
|
||||||
"@polkadot/types-create": "9.11.3",
|
"@polkadot/types-known": "10.0.1",
|
||||||
"@polkadot/types-known": "9.11.3",
|
"@polkadot/util": "^11.0.1",
|
||||||
"@polkadot/util": "^10.2.6",
|
"@polkadot/util-crypto": "^11.0.1",
|
||||||
"@polkadot/util-crypto": "^10.2.6",
|
"eventemitter3": "^5.0.0",
|
||||||
"eventemitter3": "^4.0.7",
|
"rxjs": "^7.8.0",
|
||||||
"rxjs": "^7.8.0"
|
"tslib": "^2.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "9.11.3",
|
"@polkadot/api-augment": "10.0.1",
|
||||||
"@polkadot/types-support": "9.11.3"
|
"@polkadot/types-support": "10.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,65 +60,38 @@ function getAtQueryFn<ApiType extends ApiTypes> (api: ApiDecoration<ApiType>, {
|
|||||||
|
|
||||||
export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||||
readonly #instanceId: string;
|
readonly #instanceId: string;
|
||||||
|
|
||||||
#registry: Registry;
|
|
||||||
|
|
||||||
readonly #runtimeLog: Record<string, boolean> = {};
|
readonly #runtimeLog: Record<string, boolean> = {};
|
||||||
|
|
||||||
|
#registry: Registry;
|
||||||
#storageGetQ: [Observable<Codec[]>, [StorageEntry, unknown[]][]][] = [];
|
#storageGetQ: [Observable<Codec[]>, [StorageEntry, unknown[]][]][] = [];
|
||||||
|
|
||||||
#storageSubQ: [Observable<Codec[]>, [StorageEntry, unknown[]][]][] = [];
|
#storageSubQ: [Observable<Codec[]>, [StorageEntry, unknown[]][]][] = [];
|
||||||
|
|
||||||
// HACK Use BN import so decorateDerive works... yes, wtf.
|
// HACK Use BN import so decorateDerive works... yes, wtf.
|
||||||
protected __phantom = new BN(0);
|
protected __phantom = new BN(0);
|
||||||
|
|
||||||
|
protected _type: ApiTypes;
|
||||||
protected _call: QueryableCalls<ApiType> = {} as QueryableCalls<ApiType>;
|
protected _call: QueryableCalls<ApiType> = {} as QueryableCalls<ApiType>;
|
||||||
|
|
||||||
protected _consts: QueryableConsts<ApiType> = {} as QueryableConsts<ApiType>;
|
protected _consts: QueryableConsts<ApiType> = {} as QueryableConsts<ApiType>;
|
||||||
|
|
||||||
protected _derive?: ReturnType<Decorate<ApiType>['_decorateDerive']>;
|
protected _derive?: ReturnType<Decorate<ApiType>['_decorateDerive']>;
|
||||||
|
|
||||||
protected _errors: DecoratedErrors<ApiType> = {} as DecoratedErrors<ApiType>;
|
protected _errors: DecoratedErrors<ApiType> = {} as DecoratedErrors<ApiType>;
|
||||||
|
|
||||||
protected _events: DecoratedEvents<ApiType> = {} as DecoratedEvents<ApiType>;
|
protected _events: DecoratedEvents<ApiType> = {} as DecoratedEvents<ApiType>;
|
||||||
|
|
||||||
protected _extrinsics?: SubmittableExtrinsics<ApiType>;
|
protected _extrinsics?: SubmittableExtrinsics<ApiType>;
|
||||||
|
|
||||||
protected _extrinsicType = GenericExtrinsic.LATEST_EXTRINSIC_VERSION;
|
protected _extrinsicType = GenericExtrinsic.LATEST_EXTRINSIC_VERSION;
|
||||||
|
|
||||||
protected _genesisHash?: Hash;
|
protected _genesisHash?: Hash;
|
||||||
|
|
||||||
protected _isConnected: BehaviorSubject<boolean>;
|
protected _isConnected: BehaviorSubject<boolean>;
|
||||||
|
|
||||||
protected _isReady = false;
|
protected _isReady = false;
|
||||||
|
protected _query: QueryableStorage<ApiType> = {} as QueryableStorage<ApiType>;
|
||||||
|
protected _queryMulti?: QueryableStorageMulti<ApiType>;
|
||||||
|
protected _rpc?: DecoratedRpc<ApiType, RpcInterface>;
|
||||||
|
protected _rpcCore: RpcCore & RpcInterface;
|
||||||
|
protected _runtimeMap: Record<HexString, string> = {};
|
||||||
|
protected _runtimeChain?: Text;
|
||||||
|
protected _runtimeMetadata?: Metadata;
|
||||||
|
protected _runtimeVersion?: RuntimeVersion;
|
||||||
|
protected _rx: ApiInterfaceRx = { call: {} as QueryableCalls<'rxjs'>, consts: {} as QueryableConsts<'rxjs'>, query: {} as QueryableStorage<'rxjs'>, tx: {} as SubmittableExtrinsics<'rxjs'> } as ApiInterfaceRx;
|
||||||
|
|
||||||
protected readonly _options: ApiOptions;
|
protected readonly _options: ApiOptions;
|
||||||
|
|
||||||
protected _query: QueryableStorage<ApiType> = {} as QueryableStorage<ApiType>;
|
|
||||||
|
|
||||||
protected _queryMulti?: QueryableStorageMulti<ApiType>;
|
|
||||||
|
|
||||||
protected _rpc?: DecoratedRpc<ApiType, RpcInterface>;
|
|
||||||
|
|
||||||
protected _rpcCore: RpcCore & RpcInterface;
|
|
||||||
|
|
||||||
protected _runtimeMap: Record<HexString, string> = {};
|
|
||||||
|
|
||||||
protected _runtimeChain?: Text;
|
|
||||||
|
|
||||||
protected _runtimeMetadata?: Metadata;
|
|
||||||
|
|
||||||
protected _runtimeVersion?: RuntimeVersion;
|
|
||||||
|
|
||||||
protected _rx: ApiInterfaceRx = {
|
|
||||||
call: {} as QueryableCalls<'rxjs'>,
|
|
||||||
consts: {} as QueryableConsts<'rxjs'>,
|
|
||||||
query: {} as QueryableStorage<'rxjs'>,
|
|
||||||
tx: {} as SubmittableExtrinsics<'rxjs'>
|
|
||||||
} as ApiInterfaceRx;
|
|
||||||
|
|
||||||
protected _type: ApiTypes;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the one and only method concrete children classes need to implement.
|
* This is the one and only method concrete children classes need to implement.
|
||||||
* It's a higher-order function, which takes one argument
|
* It's a higher-order function, which takes one argument
|
||||||
@@ -390,8 +363,10 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const filterKey = (k: string) => !allKeys.includes(k);
|
const unknown = exposed.filter((k: string) =>
|
||||||
const unknown = exposed.filter(filterKey);
|
!allKeys.includes(k) &&
|
||||||
|
!k.includes('_unstable_')
|
||||||
|
);
|
||||||
|
|
||||||
if (unknown.length && !this._options.noInitWarn) {
|
if (unknown.length && !this._options.noInitWarn) {
|
||||||
l.warn(`RPC methods not decorated: ${unknown.join(', ')}`);
|
l.warn(`RPC methods not decorated: ${unknown.join(', ')}`);
|
||||||
@@ -614,39 +589,44 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
protected _decorateMulti<ApiType extends ApiTypes> (decorateMethod: DecorateMethod<ApiType>): QueryableStorageMulti<ApiType> {
|
protected _decorateMulti<ApiType extends ApiTypes> (decorateMethod: DecorateMethod<ApiType>): QueryableStorageMulti<ApiType> {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||||
return decorateMethod((keys: QueryableStorageMultiArg<ApiType>[]): Observable<Codec[]> =>
|
return decorateMethod((keys: QueryableStorageMultiArg<ApiType>[]): Observable<Codec[]> =>
|
||||||
(this.hasSubscriptions
|
keys.length
|
||||||
? this._rpcCore.state.subscribeStorage
|
? (this.hasSubscriptions
|
||||||
: this._rpcCore.state.queryStorageAt
|
? this._rpcCore.state.subscribeStorage
|
||||||
)(keys.map((args: QueryableStorageMultiArg<ApiType>): [StorageEntry, ...unknown[]] =>
|
: this._rpcCore.state.queryStorageAt
|
||||||
Array.isArray(args)
|
)(keys.map((args: QueryableStorageMultiArg<ApiType>): [StorageEntry, ...unknown[]] =>
|
||||||
? args[0].creator.meta.type.isPlain
|
Array.isArray(args)
|
||||||
? [args[0].creator]
|
? args[0].creator.meta.type.isPlain
|
||||||
: args[0].creator.meta.type.asMap.hashers.length === 1
|
? [args[0].creator]
|
||||||
? [args[0].creator, args.slice(1)]
|
: args[0].creator.meta.type.asMap.hashers.length === 1
|
||||||
: [args[0].creator, ...args.slice(1)]
|
? [args[0].creator, args.slice(1)]
|
||||||
: [args.creator]
|
: [args[0].creator, ...args.slice(1)]
|
||||||
))
|
: [args.creator]
|
||||||
|
))
|
||||||
|
: of([])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected _decorateMultiAt<ApiType extends ApiTypes> (atApi: ApiDecoration<ApiType>, decorateMethod: DecorateMethod<ApiType>, blockHash: Uint8Array | string): QueryableStorageMulti<ApiType> {
|
protected _decorateMultiAt<ApiType extends ApiTypes> (atApi: ApiDecoration<ApiType>, decorateMethod: DecorateMethod<ApiType>, blockHash: Uint8Array | string): QueryableStorageMulti<ApiType> {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||||
return decorateMethod((calls: QueryableStorageMultiArg<ApiType>[]): Observable<Codec[]> =>
|
return decorateMethod((calls: QueryableStorageMultiArg<ApiType>[]): Observable<Codec[]> =>
|
||||||
this._rpcCore.state.queryStorageAt(
|
calls.length
|
||||||
calls.map((args: QueryableStorageMultiArg<ApiType>) => {
|
? this._rpcCore.state.queryStorageAt(
|
||||||
if (Array.isArray(args)) {
|
calls.map((args: QueryableStorageMultiArg<ApiType>) => {
|
||||||
const { creator } = getAtQueryFn(atApi, args[0].creator);
|
if (Array.isArray(args)) {
|
||||||
|
const { creator } = getAtQueryFn(atApi, args[0].creator);
|
||||||
|
|
||||||
return creator.meta.type.isPlain
|
return creator.meta.type.isPlain
|
||||||
? [creator]
|
? [creator]
|
||||||
: creator.meta.type.asMap.hashers.length === 1
|
: creator.meta.type.asMap.hashers.length === 1
|
||||||
? [creator, args.slice(1)]
|
? [creator, args.slice(1)]
|
||||||
: [creator, ...args.slice(1)];
|
: [creator, ...args.slice(1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [getAtQueryFn(atApi, args.creator).creator];
|
return [getAtQueryFn(atApi, args.creator).creator];
|
||||||
}),
|
}),
|
||||||
blockHash));
|
blockHash)
|
||||||
|
: of([])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected _decorateExtrinsics<ApiType extends ApiTypes> ({ tx }: DecoratedMeta, decorateMethod: DecorateMethod<ApiType>): SubmittableExtrinsics<ApiType> {
|
protected _decorateExtrinsics<ApiType extends ApiTypes> ({ tx }: DecoratedMeta, decorateMethod: DecorateMethod<ApiType>): SubmittableExtrinsics<ApiType> {
|
||||||
@@ -869,7 +849,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
nextTick((): void => {
|
nextTick((): void => {
|
||||||
// get all the calls in this instance, resolve with it
|
// get all the calls in this instance, resolve with it
|
||||||
// and then clear the queue so we don't add more
|
// and then clear the queue so we don't add more
|
||||||
// (anyhting after this will be added to a new queue)
|
// (anything after this will be added to a new queue)
|
||||||
const calls = queue[queueIdx][1];
|
const calls = queue[queueIdx][1];
|
||||||
|
|
||||||
delete queue[queueIdx];
|
delete queue[queueIdx];
|
||||||
@@ -898,7 +878,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
// Decorate the base storage call. In the case or rxjs or promise-without-callback (await)
|
// Decorate the base storage call. In the case or rxjs or promise-without-callback (await)
|
||||||
// we make a subscription, alternatively we push this through a single-shot query
|
// we make a subscription, alternatively we push this through a single-shot query
|
||||||
private _decorateStorageCall<ApiType extends ApiTypes> (creator: StorageEntry, decorateMethod: DecorateMethod<ApiType>): ReturnType<DecorateMethod<ApiType>> {
|
private _decorateStorageCall<ApiType extends ApiTypes> (creator: StorageEntry, decorateMethod: DecorateMethod<ApiType>): ReturnType<DecorateMethod<ApiType>> {
|
||||||
return decorateMethod((...args: unknown[]): Observable<Codec> => {
|
const memoed = memo(this.#instanceId, (...args: unknown[]): Observable<Codec> => {
|
||||||
const call = extractStorageArgs(this.#registry, creator, args);
|
const call = extractStorageArgs(this.#registry, creator, args);
|
||||||
|
|
||||||
if (!this.hasSubscriptions) {
|
if (!this.hasSubscriptions) {
|
||||||
@@ -906,7 +886,9 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return this._queueStorage(call, this.#storageSubQ);
|
return this._queueStorage(call, this.#storageSubQ);
|
||||||
}, {
|
});
|
||||||
|
|
||||||
|
return decorateMethod(memoed, {
|
||||||
methodName: creator.method,
|
methodName: creator.method,
|
||||||
overrideNoSub: (...args: unknown[]) =>
|
overrideNoSub: (...args: unknown[]) =>
|
||||||
this._queueStorage(extractStorageArgs(this.#registry, creator, args), this.#storageGetQ)
|
this._queueStorage(extractStorageArgs(this.#registry, creator, args), this.#storageGetQ)
|
||||||
|
|||||||
@@ -31,13 +31,9 @@ function textToString (t: Text): string {
|
|||||||
|
|
||||||
export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
||||||
#atLast: [string, ApiDecoration<ApiType>] | null = null;
|
#atLast: [string, ApiDecoration<ApiType>] | null = null;
|
||||||
|
|
||||||
#healthTimer: ReturnType<typeof setInterval> | null = null;
|
#healthTimer: ReturnType<typeof setInterval> | null = null;
|
||||||
|
|
||||||
#registries: VersionedRegistry<ApiType>[] = [];
|
#registries: VersionedRegistry<ApiType>[] = [];
|
||||||
|
|
||||||
#updateSub?: Subscription | null = null;
|
#updateSub?: Subscription | null = null;
|
||||||
|
|
||||||
#waitingRegistries: Record<HexString, Promise<VersionedRegistry<ApiType>>> = {};
|
#waitingRegistries: Record<HexString, Promise<VersionedRegistry<ApiType>>> = {};
|
||||||
|
|
||||||
constructor (options: ApiOptions, type: ApiTypes, decorateMethod: DecorateMethod<ApiType>) {
|
constructor (options: ApiOptions, type: ApiTypes, decorateMethod: DecorateMethod<ApiType>) {
|
||||||
@@ -377,6 +373,8 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _subscribeHealth (): void {
|
private _subscribeHealth (): void {
|
||||||
|
this._unsubscribeHealth();
|
||||||
|
|
||||||
// Only enable the health keepalive on WS, not needed on HTTP
|
// Only enable the health keepalive on WS, not needed on HTTP
|
||||||
this.#healthTimer = this.hasSubscriptions
|
this.#healthTimer = this.hasSubscriptions
|
||||||
? setInterval((): void => {
|
? setInterval((): void => {
|
||||||
@@ -432,7 +430,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
|
|
||||||
#onProviderDisconnect (): void {
|
#onProviderDisconnect (): void {
|
||||||
this._isConnected.next(false);
|
this._isConnected.next(false);
|
||||||
this._unsubscribeHealth();
|
this._unsubscribe();
|
||||||
this.emit('disconnected');
|
this.emit('disconnected');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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: '9.11.3' };
|
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '10.0.1' };
|
||||||
|
|||||||
@@ -14,17 +14,11 @@ export interface CombinatorFunction {
|
|||||||
|
|
||||||
export class Combinator<T extends unknown[] = unknown[]> {
|
export class Combinator<T extends unknown[] = unknown[]> {
|
||||||
#allHasFired = false;
|
#allHasFired = false;
|
||||||
|
|
||||||
#callback: CombinatorCallback<T>;
|
#callback: CombinatorCallback<T>;
|
||||||
|
|
||||||
#fired: boolean[] = [];
|
#fired: boolean[] = [];
|
||||||
|
|
||||||
#fns: CombinatorFunction[] = [];
|
#fns: CombinatorFunction[] = [];
|
||||||
|
|
||||||
#isActive = true;
|
#isActive = true;
|
||||||
|
|
||||||
#results: unknown[] = [];
|
#results: unknown[] = [];
|
||||||
|
|
||||||
#subscriptions: UnsubscribePromise[] = [];
|
#subscriptions: UnsubscribePromise[] = [];
|
||||||
|
|
||||||
constructor (fns: (CombinatorFunction | [CombinatorFunction, ...unknown[]])[], callback: CombinatorCallback<T>) {
|
constructor (fns: (CombinatorFunction | [CombinatorFunction, ...unknown[]])[], callback: CombinatorCallback<T>) {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { UnsubscribePromise } from '../types';
|
import type { UnsubscribePromise } from '../types';
|
||||||
|
|
||||||
import { Combinator } from './Combinator';
|
import { Combinator } from './Combinator';
|
||||||
@@ -19,81 +22,89 @@ describe('Combinator', (): void => {
|
|||||||
fns = [];
|
fns = [];
|
||||||
});
|
});
|
||||||
|
|
||||||
it('it triggers on all values', (done): void => {
|
it('it triggers on all values', async (): Promise<void> => {
|
||||||
let count = 0;
|
await new Promise<boolean>((resolve) => {
|
||||||
const combinator = new Combinator(
|
let count = 0;
|
||||||
[storeFn],
|
const combinator = new Combinator(
|
||||||
(value: any[]): void => {
|
[storeFn],
|
||||||
expect(value[0]).toEqual(`test${count}`);
|
(value: any[]): void => {
|
||||||
|
expect(value[0]).toEqual(`test${count}`);
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
if (count === 3) {
|
if (count === 3) {
|
||||||
done();
|
resolve(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
);
|
||||||
);
|
|
||||||
|
|
||||||
fns[0]('test0');
|
fns[0]('test0');
|
||||||
fns[0]('test1');
|
fns[0]('test1');
|
||||||
fns[0]('test2');
|
fns[0]('test2');
|
||||||
|
|
||||||
expect(combinator).toBeDefined();
|
expect(combinator).toBeDefined();
|
||||||
});
|
|
||||||
|
|
||||||
it('combines values from 2 sources, firing when it has all results', (done): void => {
|
|
||||||
const combinator = new Combinator(
|
|
||||||
[storeFn, storeFn],
|
|
||||||
(value: any[]): void => {
|
|
||||||
expect(value).toEqual(['test0', 'test1']);
|
|
||||||
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
fns[0]('test0');
|
|
||||||
fns[1]('test1');
|
|
||||||
|
|
||||||
expect(combinator).toBeDefined();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('combines values from 2 sources, allowing multiple updates', (done): void => {
|
|
||||||
let count = 0;
|
|
||||||
const combinator = new Combinator(
|
|
||||||
[storeFn, storeFn],
|
|
||||||
(value: any[]): void => {
|
|
||||||
expect(value).toEqual(
|
|
||||||
count === 0
|
|
||||||
? ['test0', 'test1']
|
|
||||||
: ['test2', 'test1']);
|
|
||||||
|
|
||||||
count++;
|
|
||||||
|
|
||||||
if (count === 2) {
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
fns[0]('test0');
|
|
||||||
fns[1]('test1');
|
|
||||||
fns[0]('test2');
|
|
||||||
|
|
||||||
expect(combinator).toBeDefined();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('unsubscribes as required', (done): void => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/require-await
|
|
||||||
const mocker = async (): Promise<any> => done;
|
|
||||||
const combinator = new Combinator([
|
|
||||||
mocker,
|
|
||||||
// eslint-disable-next-line @typescript-eslint/require-await
|
|
||||||
async (): UnsubscribePromise => (): void => undefined
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
], (value: any[]): void => {
|
|
||||||
// ignore
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
combinator.unsubscribe();
|
it('combines values from 2 sources, firing when it has all results', async (): Promise<void> => {
|
||||||
|
await new Promise<boolean>((resolve) => {
|
||||||
|
const combinator = new Combinator(
|
||||||
|
[storeFn, storeFn],
|
||||||
|
(value: any[]): void => {
|
||||||
|
expect(value).toEqual(['test0', 'test1']);
|
||||||
|
|
||||||
|
resolve(true);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
fns[0]('test0');
|
||||||
|
fns[1]('test1');
|
||||||
|
|
||||||
|
expect(combinator).toBeDefined();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('combines values from 2 sources, allowing multiple updates', async (): Promise<void> => {
|
||||||
|
await new Promise<boolean>((resolve) => {
|
||||||
|
let count = 0;
|
||||||
|
const combinator = new Combinator(
|
||||||
|
[storeFn, storeFn],
|
||||||
|
(value: any[]): void => {
|
||||||
|
expect(value).toEqual(
|
||||||
|
count === 0
|
||||||
|
? ['test0', 'test1']
|
||||||
|
: ['test2', 'test1']);
|
||||||
|
|
||||||
|
count++;
|
||||||
|
|
||||||
|
if (count === 2) {
|
||||||
|
resolve(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
fns[0]('test0');
|
||||||
|
fns[1]('test1');
|
||||||
|
fns[0]('test2');
|
||||||
|
|
||||||
|
expect(combinator).toBeDefined();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('unsubscribes as required', async (): Promise<void> => {
|
||||||
|
await new Promise<void>((resolve) => {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/require-await
|
||||||
|
const mocker = () => Promise.resolve(resolve);
|
||||||
|
const combinator = new Combinator([
|
||||||
|
mocker,
|
||||||
|
// eslint-disable-next-line @typescript-eslint/require-await
|
||||||
|
async (): UnsubscribePromise => (): void => undefined
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
], (value: any[]): void => {
|
||||||
|
// ignore
|
||||||
|
});
|
||||||
|
|
||||||
|
combinator.unsubscribe();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { HexString } from '@polkadot/util/types';
|
import type { HexString } from '@polkadot/util/types';
|
||||||
import type { SubmittableExtrinsic } from '../types';
|
import type { SubmittableExtrinsic } from '../types';
|
||||||
|
|
||||||
import { jest } from '@jest/globals';
|
|
||||||
|
|
||||||
import { createPair } from '@polkadot/keyring/pair';
|
import { createPair } from '@polkadot/keyring/pair';
|
||||||
import { createTestKeyring } from '@polkadot/keyring/testing';
|
import { createTestKeyring } from '@polkadot/keyring/testing';
|
||||||
import { MockProvider } from '@polkadot/rpc-provider/mock';
|
import { MockProvider } from '@polkadot/rpc-provider/mock';
|
||||||
@@ -47,7 +48,6 @@ describe('ApiPromise', (): void => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
beforeEach((): void => {
|
beforeEach((): void => {
|
||||||
jest.setTimeout(10000);
|
|
||||||
provider = new MockProvider(registry);
|
provider = new MockProvider(registry);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ describe('ApiPromise', (): void => {
|
|||||||
|
|
||||||
await api.disconnect();
|
await api.disconnect();
|
||||||
|
|
||||||
fail('Expected an error but none occurred.');
|
throw new Error('Expected an error but none occurred.');
|
||||||
} catch {
|
} catch {
|
||||||
// Pass
|
// Pass
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,21 +35,21 @@ function extractInfo (events: EventRecord[] = []): DispatchInfo | undefined {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class SubmittableResult implements ISubmittableResult {
|
export class SubmittableResult implements ISubmittableResult {
|
||||||
public readonly dispatchError?: DispatchError;
|
readonly dispatchError?: DispatchError;
|
||||||
|
|
||||||
public readonly dispatchInfo?: DispatchInfo;
|
readonly dispatchInfo?: DispatchInfo;
|
||||||
|
|
||||||
public readonly internalError?: Error;
|
readonly internalError?: Error;
|
||||||
|
|
||||||
public readonly events: EventRecord[];
|
readonly events: EventRecord[];
|
||||||
|
|
||||||
public readonly status: ExtrinsicStatus;
|
readonly status: ExtrinsicStatus;
|
||||||
|
|
||||||
public readonly txHash: Hash;
|
readonly txHash: Hash;
|
||||||
|
|
||||||
public readonly txIndex?: number;
|
readonly txIndex?: number;
|
||||||
|
|
||||||
public readonly blockNumber?: BlockNumber;
|
readonly blockNumber?: BlockNumber;
|
||||||
|
|
||||||
constructor ({ blockNumber, dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }: SubmittableResultValue) {
|
constructor ({ blockNumber, dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }: SubmittableResultValue) {
|
||||||
this.dispatchError = dispatchError || extractError(events);
|
this.dispatchError = dispatchError || extractError(events);
|
||||||
|
|||||||
@@ -11,9 +11,7 @@ let id = 0;
|
|||||||
|
|
||||||
export class SingleAccountSigner implements Signer {
|
export class SingleAccountSigner implements Signer {
|
||||||
readonly #keyringPair: KeyringPair;
|
readonly #keyringPair: KeyringPair;
|
||||||
|
|
||||||
readonly #registry: Registry;
|
readonly #registry: Registry;
|
||||||
|
|
||||||
readonly #signDelay: number;
|
readonly #signDelay: number;
|
||||||
|
|
||||||
constructor (registry: Registry, keyringPair: KeyringPair, signDelay = 0) {
|
constructor (registry: Registry, keyringPair: KeyringPair, signDelay = 0) {
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { augmentObject } from './augmentObject';
|
import { augmentObject } from './augmentObject';
|
||||||
|
|
||||||
describe('augmentObject', (): void => {
|
describe('augmentObject', (): void => {
|
||||||
let spy: any;
|
let spy: ReturnType<typeof jest.spyOn>;
|
||||||
|
|
||||||
beforeEach((): void => {
|
beforeEach((): void => {
|
||||||
spy = jest.spyOn(console, 'warn');
|
spy = jest.spyOn(console, 'warn');
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach((): void => {
|
afterEach((): void => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
spy.mockRestore();
|
||||||
spy.mockClear();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('logs added/removed sections and methods', (): void => {
|
it('logs added/removed sections and methods', (): void => {
|
||||||
@@ -24,12 +26,12 @@ describe('augmentObject', (): void => {
|
|||||||
|
|
||||||
expect(spy).toHaveBeenCalledWith(
|
expect(spy).toHaveBeenCalledWith(
|
||||||
expect.anything(),
|
expect.anything(),
|
||||||
expect.stringContaining('API/AUGMENT'),
|
expect.stringMatching(/API\/AUGMENT/),
|
||||||
'api.test: Found 1 added and 1 removed modules:\n\t added: new\n\tremoved: baz'
|
'api.test: Found 1 added and 1 removed modules:\n\t added: new\n\tremoved: baz'
|
||||||
);
|
);
|
||||||
expect(spy).toHaveBeenCalledWith(
|
expect(spy).toHaveBeenCalledWith(
|
||||||
expect.anything(),
|
expect.anything(),
|
||||||
expect.stringContaining('API/AUGMENT'),
|
expect.stringMatching(/API\/AUGMENT/),
|
||||||
'api.test: Found 2 added and 3 removed calls:\n\t added: bar.b, foo.d\n\tremoved: bar.a, bar.c, foo.c'
|
'api.test: Found 2 added and 3 removed calls:\n\t added: bar.b, foo.d\n\tremoved: bar.a, bar.c, foo.c'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { decorateStorage, Metadata, TypeRegistry } from '@polkadot/types';
|
import { decorateStorage, Metadata, TypeRegistry } from '@polkadot/types';
|
||||||
import metaStatic from '@polkadot/types-support/metadata/static-substrate';
|
import metaStatic from '@polkadot/types-support/metadata/static-substrate';
|
||||||
|
|
||||||
|
|||||||
@@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.11.3",
|
"version": "10.0.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@polkadot/rpc-core": "10.0.1",
|
||||||
"@polkadot/rpc-core": "9.11.3",
|
"@polkadot/types": "10.0.1",
|
||||||
"@polkadot/types": "9.11.3",
|
"@polkadot/types-codec": "10.0.1",
|
||||||
"@polkadot/types-codec": "9.11.3",
|
"@polkadot/util": "^11.0.1",
|
||||||
"@polkadot/util": "^10.2.6"
|
"tslib": "^2.5.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
|||||||
/**
|
/**
|
||||||
* Returns the number of transactions sent from given address at given time (block number).
|
* Returns the number of transactions sent from given address at given time (block number).
|
||||||
**/
|
**/
|
||||||
getTransactionCount: AugmentedRpc<(hash: H256 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
|
getTransactionCount: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
|
||||||
/**
|
/**
|
||||||
* Returns transaction receipt by transaction hash.
|
* Returns transaction receipt by transaction hash.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -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: '9.11.3' };
|
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '10.0.1' };
|
||||||
|
|||||||
@@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
@@ -20,18 +20,18 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.11.3",
|
"version": "10.0.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@polkadot/rpc-augment": "10.0.1",
|
||||||
"@polkadot/rpc-augment": "9.11.3",
|
"@polkadot/rpc-provider": "10.0.1",
|
||||||
"@polkadot/rpc-provider": "9.11.3",
|
"@polkadot/types": "10.0.1",
|
||||||
"@polkadot/types": "9.11.3",
|
"@polkadot/util": "^11.0.1",
|
||||||
"@polkadot/util": "^10.2.6",
|
"rxjs": "^7.8.0",
|
||||||
"rxjs": "^7.8.0"
|
"tslib": "^2.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/keyring": "^10.2.6",
|
"@polkadot/keyring": "^11.0.1",
|
||||||
"@polkadot/rpc-augment": "9.11.3"
|
"@polkadot/rpc-augment": "10.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ function isTreatAsHex (key: StorageKey): boolean {
|
|||||||
*/
|
*/
|
||||||
export class RpcCore {
|
export class RpcCore {
|
||||||
#instanceId: string;
|
#instanceId: string;
|
||||||
|
|
||||||
#registryDefault: Registry;
|
#registryDefault: Registry;
|
||||||
|
|
||||||
#getBlockRegistry?: (blockHash: Uint8Array) => Promise<{ registry: Registry }>;
|
#getBlockRegistry?: (blockHash: Uint8Array) => Promise<{ registry: Registry }>;
|
||||||
@@ -93,11 +92,9 @@ export class RpcCore {
|
|||||||
|
|
||||||
readonly #storageCache = new Map<string, Codec>();
|
readonly #storageCache = new Map<string, Codec>();
|
||||||
|
|
||||||
public readonly mapping = new Map<string, DefinitionRpcExt>();
|
readonly mapping = new Map<string, DefinitionRpcExt>();
|
||||||
|
readonly provider: ProviderInterface;
|
||||||
public readonly provider: ProviderInterface;
|
readonly sections: string[] = [];
|
||||||
|
|
||||||
public readonly sections: string[] = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
@@ -483,7 +480,7 @@ export class RpcCore {
|
|||||||
: meta.modifier.isOptional
|
: meta.modifier.isOptional
|
||||||
? registry.createTypeUnsafe(type, [input], { blockHash, isPedantic: true })
|
? registry.createTypeUnsafe(type, [input], { blockHash, isPedantic: true })
|
||||||
: input
|
: input
|
||||||
], { blockHash, isOptional: meta.modifier.isOptional, isPedantic: !meta.modifier.isOptional });
|
], { blockHash, isFallback: isEmpty && !!meta.fallback, isOptional: meta.modifier.isOptional, isPedantic: !meta.modifier.isOptional });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`Unable to decode storage ${key.section || 'unknown'}.${key.method || 'unknown'}:${entryNum}: ${(error as Error).message}`);
|
throw new Error(`Unable to decode storage ${key.section || 'unknown'}.${key.method || 'unknown'}:${entryNum}: ${(error as Error).message}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { RpcInterface } from './types';
|
import type { RpcInterface } from './types';
|
||||||
|
|
||||||
import { createTestPairs } from '@polkadot/keyring/testingPairs';
|
import { createTestPairs } from '@polkadot/keyring/testingPairs';
|
||||||
@@ -52,24 +55,26 @@ describe('Cached Observables', (): void => {
|
|||||||
expect(observable2).not.toBe(observable1);
|
expect(observable2).not.toBe(observable1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('subscribes to the same one if within the period (unbsub delay)', (done): void => {
|
it('subscribes to the same one if within the period (unbsub delay)', async (): Promise<void> => {
|
||||||
const observable1 = rpc.chain.subscribeNewHeads();
|
const observable1 = rpc.chain.subscribeNewHeads();
|
||||||
const sub1 = observable1.subscribe();
|
const sub1 = observable1.subscribe();
|
||||||
|
|
||||||
sub1.unsubscribe();
|
sub1.unsubscribe();
|
||||||
|
|
||||||
setTimeout((): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
const observable2 = rpc.chain.subscribeNewHeads();
|
setTimeout((): void => {
|
||||||
const sub2 = observable2.subscribe();
|
const observable2 = rpc.chain.subscribeNewHeads();
|
||||||
|
const sub2 = observable2.subscribe();
|
||||||
|
|
||||||
expect(observable1).toBe(observable2);
|
expect(observable1).toBe(observable2);
|
||||||
|
|
||||||
sub2.unsubscribe();
|
sub2.unsubscribe();
|
||||||
done();
|
resolve(true);
|
||||||
}, 500);
|
}, 500);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('clears cache if there are no more subscribers', (done): void => {
|
it('clears cache if there are no more subscribers', async (): Promise<void> => {
|
||||||
const observable1 = rpc.chain.subscribeNewHeads();
|
const observable1 = rpc.chain.subscribeNewHeads();
|
||||||
const observable2 = rpc.chain.subscribeNewHeads();
|
const observable2 = rpc.chain.subscribeNewHeads();
|
||||||
const sub1 = observable1.subscribe();
|
const sub1 = observable1.subscribe();
|
||||||
@@ -80,13 +85,15 @@ describe('Cached Observables', (): void => {
|
|||||||
sub1.unsubscribe();
|
sub1.unsubscribe();
|
||||||
sub2.unsubscribe();
|
sub2.unsubscribe();
|
||||||
|
|
||||||
setTimeout((): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
// No more subscribers, now create a new observable
|
setTimeout((): void => {
|
||||||
const observable3 = rpc.chain.subscribeNewHeads();
|
// No more subscribers, now create a new observable
|
||||||
|
const observable3 = rpc.chain.subscribeNewHeads();
|
||||||
|
|
||||||
expect(observable3).not.toBe(observable1);
|
expect(observable3).not.toBe(observable1);
|
||||||
done();
|
resolve(true);
|
||||||
}, 3500);
|
}, 3500);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('creates different observables for different methods but same arguments', (): void => {
|
it('creates different observables for different methods but same arguments', (): void => {
|
||||||
@@ -104,7 +111,7 @@ describe('Cached Observables', (): void => {
|
|||||||
expect(observable2).toBe(observable1);
|
expect(observable2).toBe(observable1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('creates multiple observables for subsequent one-shots delayed', (done): void => {
|
it('creates multiple observables for subsequent one-shots delayed', async (): Promise<void> => {
|
||||||
const observable1 = rpc.chain.getBlockHash(123);
|
const observable1 = rpc.chain.getBlockHash(123);
|
||||||
|
|
||||||
const sub = observable1.subscribe((): void => {
|
const sub = observable1.subscribe((): void => {
|
||||||
@@ -113,9 +120,11 @@ describe('Cached Observables', (): void => {
|
|||||||
|
|
||||||
expect(rpc.chain.getBlockHash(123)).toBe(observable1);
|
expect(rpc.chain.getBlockHash(123)).toBe(observable1);
|
||||||
|
|
||||||
setTimeout((): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
expect(rpc.chain.getBlockHash(123)).not.toBe(observable1);
|
setTimeout((): void => {
|
||||||
done();
|
expect(rpc.chain.getBlockHash(123)).not.toBe(observable1);
|
||||||
}, 3500);
|
resolve(true);
|
||||||
|
}, 3500);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { ProviderInterface } from '@polkadot/rpc-provider/types';
|
import type { ProviderInterface } from '@polkadot/rpc-provider/types';
|
||||||
|
|
||||||
import { MockProvider } from '@polkadot/rpc-provider/mock';
|
import { MockProvider } from '@polkadot/rpc-provider/mock';
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { ProviderInterface } from '@polkadot/rpc-provider/types';
|
import type { ProviderInterface } from '@polkadot/rpc-provider/types';
|
||||||
import type { DefinitionRpc } from '@polkadot/types/types';
|
import type { DefinitionRpc } from '@polkadot/types/types';
|
||||||
|
|
||||||
@@ -39,31 +42,35 @@ describe('methodSend', (): void => {
|
|||||||
rpc = new RpcCore('987', registry, provider);
|
rpc = new RpcCore('987', registry, provider);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('checks for mismatched parameters', (done): void => {
|
it('checks for mismatched parameters', async (): Promise<void> => {
|
||||||
// private method
|
// private method
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
||||||
const method = (rpc as any)._createMethodSend('test', 'bleh', methods.bleh);
|
const method = (rpc as any)._createMethodSend('test', 'bleh', methods.bleh);
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
await new Promise<boolean>((resolve) => {
|
||||||
method(1).subscribe(
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
||||||
(): void => undefined,
|
method(1).subscribe(
|
||||||
(error: Error): void => {
|
(): void => undefined,
|
||||||
expect(error.message).toMatch(/parameters, 1 found instead/);
|
(error: Error): void => {
|
||||||
done();
|
expect(error.message).toMatch(/parameters, 1 found instead/);
|
||||||
});
|
resolve(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('calls the provider with the correct parameters', (done): void => {
|
it('calls the provider with the correct parameters', async (): Promise<void> => {
|
||||||
// private method
|
// private method
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
||||||
const method = (rpc as any)._createMethodSend('test', 'blah', methods.blah);
|
const method = (rpc as any)._createMethodSend('test', 'blah', methods.blah);
|
||||||
|
|
||||||
// Args are length-prefixed, because it's a Bytes
|
await new Promise<boolean>((resolve) => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
// Args are length-prefixed, because it's a Bytes
|
||||||
method(new Uint8Array([2 << 2, 0x12, 0x34])).subscribe((): void => {
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
method(new Uint8Array([2 << 2, 0x12, 0x34])).subscribe((): void => {
|
||||||
expect(provider.send).toHaveBeenCalledWith('test_blah', ['0x1234'], false);
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||||
done();
|
expect(provider.send).toHaveBeenCalledWith('test_blah', ['0x1234'], false);
|
||||||
|
resolve(true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '9.11.3' };
|
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '10.0.1' };
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { RpcInterface } from './types';
|
import type { RpcInterface } from './types';
|
||||||
|
|
||||||
import { MockProvider } from '@polkadot/rpc-provider/mock';
|
import { MockProvider } from '@polkadot/rpc-provider/mock';
|
||||||
@@ -22,17 +25,19 @@ describe('replay', (): void => {
|
|||||||
await provider.disconnect();
|
await provider.disconnect();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the observable value', (done): void => {
|
it('returns the observable value', async (): Promise<void> => {
|
||||||
rpc.system.chain().subscribe((value: any): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
if (value) {
|
rpc.system.chain().subscribe((value: any): void => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
if (value) {
|
||||||
expect(value.toString()).toEqual('mockChain'); // Defined in MockProvider
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
|
||||||
done();
|
expect(value.toString()).toEqual('mockChain'); // Defined in MockProvider
|
||||||
}
|
resolve(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('replay(1) works as expected', (done): void => {
|
it('replay(1) works as expected', async (): Promise<void> => {
|
||||||
const observable = rpc.system.chain();
|
const observable = rpc.system.chain();
|
||||||
let a: any | undefined;
|
let a: any | undefined;
|
||||||
|
|
||||||
@@ -40,28 +45,32 @@ describe('replay', (): void => {
|
|||||||
a = value;
|
a = value;
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout((): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
// Subscribe again to the same observable, it should fire value immediately
|
setTimeout((): void => {
|
||||||
observable.subscribe((value: any): void => {
|
// Subscribe again to the same observable, it should fire value immediately
|
||||||
expect(value).toEqual(a);
|
observable.subscribe((value: any): void => {
|
||||||
done();
|
expect(value).toEqual(a);
|
||||||
});
|
resolve(true);
|
||||||
}, 1000);
|
});
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('unsubscribes as required', (done): void => {
|
it('unsubscribes as required', async (): Promise<void> => {
|
||||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
||||||
rpc.provider.unsubscribe = jest.fn();
|
rpc.provider.unsubscribe = jest.fn();
|
||||||
|
|
||||||
const subscription = rpc.chain.subscribeNewHeads().subscribe((): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
subscription.unsubscribe();
|
const subscription = rpc.chain.subscribeNewHeads().subscribe((): void => {
|
||||||
|
subscription.unsubscribe();
|
||||||
|
|
||||||
// There's a promise inside .unsubscribe(), wait a bit (> 2s)
|
// There's a promise inside .unsubscribe(), wait a bit (> 2s)
|
||||||
setTimeout((): void => {
|
setTimeout((): void => {
|
||||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
||||||
expect(rpc.provider.unsubscribe).toHaveBeenCalled();
|
expect(rpc.provider.unsubscribe).toHaveBeenCalled();
|
||||||
done();
|
resolve(true);
|
||||||
}, 3500);
|
}, 3500);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,47 +1,51 @@
|
|||||||
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { jest } from '@jest/globals';
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { of, timer } from 'rxjs';
|
import { of, timer } from 'rxjs';
|
||||||
|
|
||||||
import { drr } from '.';
|
import { drr } from '.';
|
||||||
|
|
||||||
describe('drr', (): void => {
|
describe('drr', (): void => {
|
||||||
beforeEach((): void => {
|
it('should not fire twice the same value', async (): Promise<void> => {
|
||||||
jest.setTimeout(15000);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should not fire twice the same value', (done): void => {
|
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
|
||||||
const sub = of(1, 1).pipe(drr({ delay: 500 })).subscribe((): void => {
|
const sub = of(1, 1).pipe(drr({ delay: 500 })).subscribe((): void => {
|
||||||
++count;
|
++count;
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout((): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
expect(count).toBe(1);
|
setTimeout((): void => {
|
||||||
sub.unsubscribe();
|
expect(count).toBe(1);
|
||||||
|
sub.unsubscribe();
|
||||||
|
|
||||||
setTimeout(done, 2000);
|
setTimeout(() => {
|
||||||
}, 50);
|
resolve(true);
|
||||||
|
}, 2000);
|
||||||
|
}, 50);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be a ReplaySubject(1)', (done): void => {
|
it('should be a ReplaySubject(1)', async (): Promise<void> => {
|
||||||
const obs = timer(0, 100).pipe(drr({ delay: 500 })); // Starts at 0, increments every 100ms
|
const obs = timer(0, 100).pipe(drr({ delay: 500 })); // Starts at 0, increments every 100ms
|
||||||
|
|
||||||
const sub = obs.subscribe(); // Fire the observable
|
const sub = obs.subscribe(); // Fire the observable
|
||||||
|
|
||||||
// Subscribe another time after some time, i.e. after the observable has fired
|
await new Promise<boolean>((resolve) => {
|
||||||
setTimeout((): void => {
|
// Subscribe another time after some time, i.e. after the observable has fired
|
||||||
const sub = obs.subscribe((value): void => {
|
setTimeout((): void => {
|
||||||
expect(value > 1).toBe(true);
|
const sub = obs.subscribe((value): void => {
|
||||||
|
expect(value > 1).toBe(true);
|
||||||
|
|
||||||
setTimeout(done, 2000);
|
setTimeout(() => {
|
||||||
});
|
resolve(true);
|
||||||
|
}, 2000);
|
||||||
|
});
|
||||||
|
|
||||||
|
sub.unsubscribe();
|
||||||
|
}, 500);
|
||||||
|
|
||||||
sub.unsubscribe();
|
sub.unsubscribe();
|
||||||
}, 500);
|
});
|
||||||
|
|
||||||
sub.unsubscribe();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
@@ -20,26 +20,26 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.11.3",
|
"version": "10.0.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.7",
|
"@polkadot/keyring": "^11.0.1",
|
||||||
"@polkadot/keyring": "^10.2.6",
|
"@polkadot/types": "10.0.1",
|
||||||
"@polkadot/types": "9.11.3",
|
"@polkadot/types-support": "10.0.1",
|
||||||
"@polkadot/types-support": "9.11.3",
|
"@polkadot/util": "^11.0.1",
|
||||||
"@polkadot/util": "^10.2.6",
|
"@polkadot/util-crypto": "^11.0.1",
|
||||||
"@polkadot/util-crypto": "^10.2.6",
|
"@polkadot/x-fetch": "^11.0.1",
|
||||||
"@polkadot/x-fetch": "^10.2.6",
|
"@polkadot/x-global": "^11.0.1",
|
||||||
"@polkadot/x-global": "^10.2.6",
|
"@polkadot/x-ws": "^11.0.1",
|
||||||
"@polkadot/x-ws": "^10.2.6",
|
"eventemitter3": "^5.0.0",
|
||||||
"eventemitter3": "^4.0.7",
|
"mock-socket": "^9.2.1",
|
||||||
"mock-socket": "^9.1.5",
|
"nock": "^13.3.0",
|
||||||
"nock": "^13.3.0"
|
"tslib": "^2.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@substrate/connect": "0.7.19"
|
"@substrate/connect": "0.7.20"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@substrate/connect": "0.7.19"
|
"@substrate/connect": "0.7.20"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { JsonRpcResponse } from '../types';
|
import type { JsonRpcResponse } from '../types';
|
||||||
|
|
||||||
import { RpcCoder } from '.';
|
import { RpcCoder } from '.';
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { RpcCoder } from '.';
|
import { RpcCoder } from '.';
|
||||||
|
|
||||||
describe('encodeJson', (): void => {
|
describe('encodeJson', (): void => {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { RpcCoder } from '.';
|
import { RpcCoder } from '.';
|
||||||
|
|
||||||
describe('encodeObject', (): void => {
|
describe('encodeObject', (): void => {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { isError } from '@polkadot/util/is/error';
|
import { isError } from '@polkadot/util/is/error';
|
||||||
|
|
||||||
import RpcError from './error';
|
import RpcError from './error';
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { TEST_HTTP_URL } from '../mock/mockHttp';
|
import { TEST_HTTP_URL } from '../mock/mockHttp';
|
||||||
import { HttpProvider } from './';
|
import { HttpProvider } from './';
|
||||||
|
|
||||||
@@ -41,16 +44,16 @@ describe('Http', (): void => {
|
|||||||
expect(http.isConnected).toEqual(true);
|
expect(http.isConnected).toEqual(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not (yet) support subscribe', (): Promise<number | void> => {
|
it('does not (yet) support subscribe', async (): Promise<void> => {
|
||||||
return http.subscribe('', '', [], (cb): void => {
|
await http.subscribe('', '', [], (cb): void => {
|
||||||
expect(cb).toEqual(expect.anything());
|
expect(cb).toEqual(expect.anything());
|
||||||
}).catch((error): void => {
|
}).catch((error): void => {
|
||||||
expect((error as Error).message).toMatch(/does not have subscriptions/);
|
expect((error as Error).message).toMatch(/does not have subscriptions/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not (yet) support unsubscribe', (): Promise<boolean | void> => {
|
it('does not (yet) support unsubscribe', async (): Promise<void> => {
|
||||||
return http.unsubscribe('', '', 0).catch((error): void => {
|
await http.unsubscribe('', '', 0).catch((error): void => {
|
||||||
expect((error as Error).message).toMatch(/does not have subscriptions/);
|
expect((error as Error).message).toMatch(/does not have subscriptions/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,13 +36,9 @@ const l = logger('api-http');
|
|||||||
*/
|
*/
|
||||||
export class HttpProvider implements ProviderInterface {
|
export class HttpProvider implements ProviderInterface {
|
||||||
readonly #callCache = new LRUCache();
|
readonly #callCache = new LRUCache();
|
||||||
|
|
||||||
readonly #coder: RpcCoder;
|
readonly #coder: RpcCoder;
|
||||||
|
|
||||||
readonly #endpoint: string;
|
readonly #endpoint: string;
|
||||||
|
|
||||||
readonly #headers: Record<string, string>;
|
readonly #headers: Record<string, string>;
|
||||||
|
|
||||||
readonly #stats: ProviderStats;
|
readonly #stats: ProviderStats;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { Mock } from '../mock/types';
|
import type { Mock } from '../mock/types';
|
||||||
|
|
||||||
import { mockHttp, TEST_HTTP_URL } from '../mock/mockHttp';
|
import { mockHttp, TEST_HTTP_URL } from '../mock/mockHttp';
|
||||||
import { HttpProvider } from './';
|
import { HttpProvider } from './';
|
||||||
|
|
||||||
describe('send', (): void => {
|
// Does not work with Node 18 (native fetch)
|
||||||
|
// See https://github.com/nock/nock/issues/2397
|
||||||
|
describe.skip('send', (): void => {
|
||||||
let http: HttpProvider;
|
let http: HttpProvider;
|
||||||
let mock: Mock;
|
let mock: Mock;
|
||||||
|
|
||||||
@@ -14,9 +19,9 @@ describe('send', (): void => {
|
|||||||
http = new HttpProvider(TEST_HTTP_URL);
|
http = new HttpProvider(TEST_HTTP_URL);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach((): void => {
|
afterEach(async () => {
|
||||||
if (mock) {
|
if (mock) {
|
||||||
mock.done();
|
await mock.done();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { LRUCache } from './lru';
|
import { LRUCache } from './lru';
|
||||||
|
|
||||||
describe('LRUCache', (): void => {
|
describe('LRUCache', (): void => {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
const DEFAULT_CAPACITY = 128;
|
const DEFAULT_CAPACITY = 128;
|
||||||
|
|
||||||
class LRUNode {
|
class LRUNode {
|
||||||
public readonly key: string;
|
readonly key: string;
|
||||||
|
|
||||||
public next: LRUNode;
|
public next: LRUNode;
|
||||||
public prev: LRUNode;
|
public prev: LRUNode;
|
||||||
@@ -21,6 +21,7 @@ class LRUNode {
|
|||||||
// https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU
|
// https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU
|
||||||
export class LRUCache {
|
export class LRUCache {
|
||||||
readonly capacity: number;
|
readonly capacity: number;
|
||||||
|
|
||||||
readonly #data: Map<string, unknown> = new Map();
|
readonly #data: Map<string, unknown> = new Map();
|
||||||
readonly #refs: Map<string, LRUNode> = new Map();
|
readonly #refs: Map<string, LRUNode> = new Map();
|
||||||
|
|
||||||
|
|||||||
@@ -69,11 +69,7 @@ export function mockWs (requests: Request[], wsUrl: string = TEST_WS_URL): Scope
|
|||||||
let requestCount = 0;
|
let requestCount = 0;
|
||||||
const scope: Scope = {
|
const scope: Scope = {
|
||||||
body: {},
|
body: {},
|
||||||
done: (): void => {
|
done: () => new Promise<void>((resolve) => server.stop(resolve)),
|
||||||
server.stop((): void => {
|
|
||||||
// ignore
|
|
||||||
});
|
|
||||||
},
|
|
||||||
requests: 0,
|
requests: 0,
|
||||||
server
|
server
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import type { ProviderInterfaceEmitted } from '../types';
|
import type { ProviderInterfaceEmitted } from '../types';
|
||||||
|
|
||||||
import { TypeRegistry } from '@polkadot/types/create';
|
import { TypeRegistry } from '@polkadot/types/create';
|
||||||
@@ -19,20 +22,22 @@ describe('on', (): void => {
|
|||||||
await mock.disconnect();
|
await mock.disconnect();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('it emits both connected and disconnected events', (done): void => {
|
it('it emits both connected and disconnected events', async (): Promise<void> => {
|
||||||
const events: Record<string, boolean> = { connected: false, disconnected: false };
|
const events: Record<string, boolean> = { connected: false, disconnected: false };
|
||||||
|
|
||||||
const handler = (type: ProviderInterfaceEmitted): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
mock.on(type, (): void => {
|
const handler = (type: ProviderInterfaceEmitted): void => {
|
||||||
events[type] = true;
|
mock.on(type, (): void => {
|
||||||
|
events[type] = true;
|
||||||
|
|
||||||
if (Object.values(events).filter((value): boolean => value).length === 2) {
|
if (Object.values(events).filter((value): boolean => value).length === 2) {
|
||||||
done();
|
resolve(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
handler('connected');
|
handler('connected');
|
||||||
handler('disconnected');
|
handler('disconnected');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { TypeRegistry } from '@polkadot/types/create';
|
import { TypeRegistry } from '@polkadot/types/create';
|
||||||
|
|
||||||
import { MockProvider } from '.';
|
import { MockProvider } from '.';
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { TypeRegistry } from '@polkadot/types/create';
|
import { TypeRegistry } from '@polkadot/types/create';
|
||||||
|
|
||||||
import { MockProvider } from './';
|
import { MockProvider } from './';
|
||||||
@@ -17,53 +20,59 @@ describe('subscribe', (): void => {
|
|||||||
await mock.disconnect();
|
await mock.disconnect();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('fails on unknown methods', (): Promise<number | void> => {
|
it('fails on unknown methods', async (): Promise<void> => {
|
||||||
return mock
|
await mock
|
||||||
.subscribe('test', 'test_notFound')
|
.subscribe('test', 'test_notFound')
|
||||||
.catch((error): void => {
|
.catch((error): void => {
|
||||||
expect((error as Error).message).toMatch(/Invalid method 'test_notFound'/);
|
expect((error as Error).message).toMatch(/Invalid method 'test_notFound'/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns a subscription id', (): Promise<void> => {
|
it('returns a subscription id', async (): Promise<void> => {
|
||||||
return mock
|
await mock
|
||||||
.subscribe('chain_newHead', 'chain_subscribeNewHead', (): void => undefined)
|
.subscribe('chain_newHead', 'chain_subscribeNewHead', (): void => undefined)
|
||||||
.then((id): void => {
|
.then((id): void => {
|
||||||
expect(id).toEqual(1);
|
expect(id).toEqual(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('calls back with the last known value', (done): void => {
|
it('calls back with the last known value', async (): Promise<void> => {
|
||||||
mock.isUpdating = false;
|
mock.isUpdating = false;
|
||||||
mock.subscriptions.chain_subscribeNewHead.lastValue = 'testValue';
|
mock.subscriptions.chain_subscribeNewHead.lastValue = 'testValue';
|
||||||
|
|
||||||
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, value: string): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
expect(value).toEqual('testValue');
|
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, value: string): void => {
|
||||||
done();
|
expect(value).toEqual('testValue');
|
||||||
}).catch(console.error);
|
resolve(true);
|
||||||
|
}).catch(console.error);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('calls back with new headers', (done): void => {
|
it('calls back with new headers', async (): Promise<void> => {
|
||||||
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, header: { number: number }): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
if (header.number === 4) {
|
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, header: { number: number }): void => {
|
||||||
done();
|
if (header.number === 4) {
|
||||||
}
|
resolve(true);
|
||||||
}).catch(console.error);
|
}
|
||||||
|
}).catch(console.error);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('handles errors withing callbacks gracefully', (done): void => {
|
it('handles errors within callbacks gracefully', async (): Promise<void> => {
|
||||||
let hasThrown = false;
|
let hasThrown = false;
|
||||||
|
|
||||||
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, header: { number: number }): void => {
|
await new Promise<boolean>((resolve) => {
|
||||||
if (!hasThrown) {
|
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, header: { number: number }): void => {
|
||||||
hasThrown = true;
|
if (!hasThrown) {
|
||||||
|
hasThrown = true;
|
||||||
|
|
||||||
throw new Error('testing');
|
throw new Error('testing');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (header.number === 3) {
|
if (header.number === 3) {
|
||||||
done();
|
resolve(true);
|
||||||
}
|
}
|
||||||
}).catch(console.error);
|
}).catch(console.error);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,11 +2,9 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Server } from 'mock-socket';
|
import type { Server } from 'mock-socket';
|
||||||
import type { Constructor } from '@polkadot/types/types';
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
export type Global = typeof globalThis & {
|
||||||
export interface Global extends NodeJS.Global {
|
WebSocket: typeof WebSocket;
|
||||||
WebSocket: Constructor<WebSocket>;
|
|
||||||
fetch: any;
|
fetch: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,7 +12,7 @@ export interface Mock {
|
|||||||
body: Record<string, Record<string, unknown>>;
|
body: Record<string, Record<string, unknown>>;
|
||||||
requests: number;
|
requests: number;
|
||||||
server: Server;
|
server: Server;
|
||||||
done: () => Record<string, unknown>;
|
done: () => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type MockStateSubscriptionCallback = (error: Error | null, value: any) => void;
|
export type MockStateSubscriptionCallback = (error: Error | null, value: any) => void;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
import { TypeRegistry } from '@polkadot/types/create';
|
import { TypeRegistry } from '@polkadot/types/create';
|
||||||
|
|
||||||
import { MockProvider } from '.';
|
import { MockProvider } from '.';
|
||||||
@@ -24,8 +27,8 @@ describe('unsubscribe', (): void => {
|
|||||||
await mock.disconnect();
|
await mock.disconnect();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('fails on unknown ids', (): Promise<boolean> => {
|
it('fails on unknown ids', async (): Promise<void> => {
|
||||||
return mock
|
await mock
|
||||||
.unsubscribe('chain_newHead', 'chain_subscribeNewHead', 5)
|
.unsubscribe('chain_newHead', 'chain_subscribeNewHead', 5)
|
||||||
.catch((error): boolean => {
|
.catch((error): boolean => {
|
||||||
expect((error as Error).message).toMatch(/Unable to find/);
|
expect((error as Error).message).toMatch(/Unable to find/);
|
||||||
@@ -34,12 +37,12 @@ describe('unsubscribe', (): void => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('unsubscribes successfully', (): Promise<boolean> => {
|
it('unsubscribes successfully', async (): Promise<void> => {
|
||||||
return mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id);
|
await mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('fails on double unsubscribe', (): Promise<boolean> => {
|
it('fails on double unsubscribe', async (): Promise<void> => {
|
||||||
return mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id)
|
await mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id)
|
||||||
.then((): Promise<boolean> =>
|
.then((): Promise<boolean> =>
|
||||||
mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id)
|
mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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: '9.11.3' };
|
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '10.0.1' };
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// eslint-disable-next-line spaced-comment
|
||||||
|
/// <reference types="@polkadot/dev/node/test/node" />
|
||||||
|
|
||||||
/* eslint-disable sort-keys */
|
/* eslint-disable sort-keys */
|
||||||
/* eslint-disable promise/param-names */
|
/* eslint-disable promise/param-names */
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||||
@@ -21,18 +24,33 @@
|
|||||||
import type Sc from '@substrate/connect';
|
import type Sc from '@substrate/connect';
|
||||||
import type { HealthChecker, SmoldotHealth } from './types';
|
import type { HealthChecker, SmoldotHealth } from './types';
|
||||||
|
|
||||||
import { jest } from '@jest/globals';
|
|
||||||
|
|
||||||
import { ScProvider } from '.';
|
import { ScProvider } from '.';
|
||||||
|
|
||||||
const wait = (ms: number) => new Promise((res) => setTimeout(res, ms));
|
type MockChain = Sc.Chain & {
|
||||||
|
_spec: () => string
|
||||||
|
_recevedRequests: () => string[]
|
||||||
|
_isTerminated: () => boolean
|
||||||
|
_triggerCallback: (response: string | {}) => void
|
||||||
|
_setTerminateInterceptor: (fn: () => void) => void
|
||||||
|
_setSendJsonRpcInterceptor: (fn: (rpc: string) => void) => void
|
||||||
|
_getLatestRequest: () => string
|
||||||
|
}
|
||||||
|
|
||||||
type MockedHealthChecker = HealthChecker & {
|
type MockedHealthChecker = HealthChecker & {
|
||||||
_isActive: () => boolean
|
_isActive: () => boolean
|
||||||
_triggerHealthUpdate: (update: SmoldotHealth) => void
|
_triggerHealthUpdate: (update: SmoldotHealth) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const healthCheckerMock = (): MockedHealthChecker => {
|
enum WellKnownChain {
|
||||||
|
polkadot = 'polkadot',
|
||||||
|
ksmcc3 = 'ksmcc3',
|
||||||
|
rococo_v2_2 = 'rococo_v2_2',
|
||||||
|
westend2 = 'westend2'
|
||||||
|
}
|
||||||
|
|
||||||
|
const wait = (ms: number) => new Promise((res) => setTimeout(res, ms));
|
||||||
|
|
||||||
|
function healthCheckerMock (): MockedHealthChecker {
|
||||||
let cb: (health: SmoldotHealth) => void = () => {};
|
let cb: (health: SmoldotHealth) => void = () => {};
|
||||||
|
|
||||||
let sendJsonRpc: (request: string) => void = () => {};
|
let sendJsonRpc: (request: string) => void = () => {};
|
||||||
@@ -57,9 +75,9 @@ const healthCheckerMock = (): MockedHealthChecker => {
|
|||||||
cb(update);
|
cb(update);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
const healthCheckerFactory = () => {
|
function healthCheckerFactory () {
|
||||||
const _healthCheckers: MockedHealthChecker[] = [];
|
const _healthCheckers: MockedHealthChecker[] = [];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -73,21 +91,9 @@ const healthCheckerFactory = () => {
|
|||||||
_healthCheckers,
|
_healthCheckers,
|
||||||
_latestHealthChecker: () => _healthCheckers.slice(-1)[0]
|
_latestHealthChecker: () => _healthCheckers.slice(-1)[0]
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
jest.mock('./Health', () => healthCheckerFactory());
|
|
||||||
|
|
||||||
type MockChain = Sc.Chain & {
|
|
||||||
_spec: () => string
|
|
||||||
_recevedRequests: () => string[]
|
|
||||||
_isTerminated: () => boolean
|
|
||||||
_triggerCallback: (response: string | {}) => void
|
|
||||||
_setTerminateInterceptor: (fn: () => void) => void
|
|
||||||
_setSendJsonRpcInterceptor: (fn: (rpc: string) => void) => void
|
|
||||||
_getLatestRequest: () => string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getFakeChain = (spec: string, callback: Sc.JsonRpcCallback): MockChain => {
|
function getFakeChain (spec: string, callback: Sc.JsonRpcCallback): MockChain {
|
||||||
const _receivedRequests: string[] = [];
|
const _receivedRequests: string[] = [];
|
||||||
let _isTerminated = false;
|
let _isTerminated = false;
|
||||||
|
|
||||||
@@ -119,9 +125,9 @@ const getFakeChain = (spec: string, callback: Sc.JsonRpcCallback): MockChain =>
|
|||||||
},
|
},
|
||||||
_getLatestRequest: () => _receivedRequests[_receivedRequests.length - 1]
|
_getLatestRequest: () => _receivedRequests[_receivedRequests.length - 1]
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
const getFakeClient = () => {
|
function getFakeClient () {
|
||||||
const chains: MockChain[] = [];
|
const chains: MockChain[] = [];
|
||||||
let addChainInterceptor: Promise<void> = Promise.resolve();
|
let addChainInterceptor: Promise<void> = Promise.resolve();
|
||||||
let addWellKnownChainInterceptor: Promise<void> = Promise.resolve();
|
let addWellKnownChainInterceptor: Promise<void> = Promise.resolve();
|
||||||
@@ -154,16 +160,9 @@ const getFakeClient = () => {
|
|||||||
return result;
|
return result;
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
enum WellKnownChain {
|
|
||||||
polkadot = 'polkadot',
|
|
||||||
ksmcc3 = 'ksmcc3',
|
|
||||||
rococo_v2_2 = 'rococo_v2_2',
|
|
||||||
westend2 = 'westend2'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const connectorFactory = () => {
|
function connectorFactory () {
|
||||||
const clients: ReturnType<typeof getFakeClient>[] = [];
|
const clients: ReturnType<typeof getFakeClient>[] = [];
|
||||||
const latestClient = () => clients[clients.length - 1];
|
const latestClient = () => clients[clients.length - 1];
|
||||||
|
|
||||||
@@ -181,26 +180,26 @@ const connectorFactory = () => {
|
|||||||
latestChain: () =>
|
latestChain: () =>
|
||||||
latestClient()._chains()[latestClient()._chains().length - 1]
|
latestClient()._chains()[latestClient()._chains().length - 1]
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
let mockSc: typeof Sc & { latestChain: () => MockChain };
|
function setChainSyncyingStatus (isSyncing: boolean) {
|
||||||
let mockedHealthChecker: ReturnType<typeof healthCheckerFactory>;
|
|
||||||
const getCurrentHealthChecker = () => mockedHealthChecker._latestHealthChecker();
|
|
||||||
|
|
||||||
const setChainSyncyingStatus = (isSyncing: boolean) => {
|
|
||||||
getCurrentHealthChecker()._triggerHealthUpdate({
|
getCurrentHealthChecker()._triggerHealthUpdate({
|
||||||
isSyncing,
|
isSyncing,
|
||||||
peers: 1,
|
peers: 1,
|
||||||
shouldHavePeers: true
|
shouldHavePeers: true
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
beforeAll(() => {
|
let mockSc: typeof Sc & { latestChain: () => MockChain };
|
||||||
mockSc = connectorFactory() as unknown as typeof Sc & { latestChain: () => MockChain };
|
let mockedHealthChecker: ReturnType<typeof healthCheckerFactory>;
|
||||||
mockedHealthChecker = healthCheckerFactory();
|
const getCurrentHealthChecker = () => mockedHealthChecker._latestHealthChecker();
|
||||||
});
|
|
||||||
|
|
||||||
describe('ScProvider', () => {
|
describe('ScProvider', () => {
|
||||||
|
beforeAll(() => {
|
||||||
|
mockSc = connectorFactory() as unknown as typeof Sc & { latestChain: () => MockChain };
|
||||||
|
mockedHealthChecker = healthCheckerFactory();
|
||||||
|
});
|
||||||
|
|
||||||
describe('on', () => {
|
describe('on', () => {
|
||||||
it('emits `connected` as soon as the chain is not syncing', async () => {
|
it('emits `connected` as soon as the chain is not syncing', async () => {
|
||||||
const provider = new ScProvider(mockSc, '');
|
const provider = new ScProvider(mockSc, '');
|
||||||
@@ -251,16 +250,15 @@ describe('ScProvider', () => {
|
|||||||
setChainSyncyingStatus(false);
|
setChainSyncyingStatus(false);
|
||||||
|
|
||||||
const onConnected = jest.fn();
|
const onConnected = jest.fn();
|
||||||
|
|
||||||
provider.on('connected', onConnected);
|
|
||||||
const onDisconnected = jest.fn();
|
const onDisconnected = jest.fn();
|
||||||
|
|
||||||
|
provider.on('connected', onConnected);
|
||||||
provider.on('disconnected', onDisconnected);
|
provider.on('disconnected', onDisconnected);
|
||||||
|
|
||||||
expect(onConnected).toHaveBeenCalled();
|
expect(onConnected).toHaveBeenCalled();
|
||||||
expect(onDisconnected).not.toHaveBeenCalled();
|
expect(onDisconnected).not.toHaveBeenCalled();
|
||||||
|
|
||||||
onConnected.mockRestore();
|
onConnected.mockReset();
|
||||||
setChainSyncyingStatus(true);
|
setChainSyncyingStatus(true);
|
||||||
|
|
||||||
expect(onConnected).not.toHaveBeenCalled();
|
expect(onConnected).not.toHaveBeenCalled();
|
||||||
@@ -284,7 +282,7 @@ describe('ScProvider', () => {
|
|||||||
|
|
||||||
await provider.connect(undefined, mockedHealthChecker.healthChecker);
|
await provider.connect(undefined, mockedHealthChecker.healthChecker);
|
||||||
|
|
||||||
expect(() => provider.clone()).toThrowError();
|
expect(() => provider.clone()).toThrow();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -306,9 +304,9 @@ describe('ScProvider', () => {
|
|||||||
|
|
||||||
setChainSyncyingStatus(false);
|
setChainSyncyingStatus(false);
|
||||||
|
|
||||||
await expect(provider.connect(undefined, mockedHealthChecker.healthChecker)).rejects.toThrowError(
|
await expect(
|
||||||
'Already connected!'
|
provider.connect(undefined, mockedHealthChecker.healthChecker)
|
||||||
);
|
).rejects.toThrow(/Already connected/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -328,9 +326,8 @@ describe('ScProvider', () => {
|
|||||||
const provider = new ScProvider(mockSc, '');
|
const provider = new ScProvider(mockSc, '');
|
||||||
|
|
||||||
await provider.connect(undefined, mockedHealthChecker.healthChecker);
|
await provider.connect(undefined, mockedHealthChecker.healthChecker);
|
||||||
|
|
||||||
await provider.disconnect();
|
await provider.disconnect();
|
||||||
await expect(provider.disconnect()).resolves.not.toThrow();
|
await provider.disconnect();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -402,9 +399,9 @@ describe('ScProvider', () => {
|
|||||||
throw new Error('boom!');
|
throw new Error('boom!');
|
||||||
});
|
});
|
||||||
|
|
||||||
await expect(provider.send('getData', ['foo'])).rejects.toThrowError(
|
await expect(
|
||||||
'Disconnected'
|
provider.send('getData', ['foo'])
|
||||||
);
|
).rejects.toThrow(/Disconnected/);
|
||||||
expect(provider.isConnected).toBe(false);
|
expect(provider.isConnected).toBe(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -551,8 +548,7 @@ describe('ScProvider', () => {
|
|||||||
|
|
||||||
expect(token).toBe(unsubscribeToken);
|
expect(token).toBe(unsubscribeToken);
|
||||||
expect(cb).toHaveBeenCalledTimes(1);
|
expect(cb).toHaveBeenCalledTimes(1);
|
||||||
expect(cb.mock.lastCall![0]).toBeInstanceOf(Error);
|
expect(cb).toHaveBeenLastCalledWith(expect.any(Error), undefined);
|
||||||
expect(cb.mock.lastCall![1]).toBe(undefined);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('errors when subscribing to an unsupported method', async () => {
|
it('errors when subscribing to an unsupported method', async () => {
|
||||||
@@ -561,11 +557,11 @@ describe('ScProvider', () => {
|
|||||||
await provider.connect(undefined, mockedHealthChecker.healthChecker);
|
await provider.connect(undefined, mockedHealthChecker.healthChecker);
|
||||||
|
|
||||||
setChainSyncyingStatus(false);
|
setChainSyncyingStatus(false);
|
||||||
await wait(0);
|
|
||||||
|
|
||||||
|
await wait(0);
|
||||||
await expect(
|
await expect(
|
||||||
provider.subscribe('foo', 'bar', ['baz'], () => {})
|
provider.subscribe('foo', 'bar', ['baz'], () => {})
|
||||||
).rejects.toThrowError('Unsupported subscribe method: bar');
|
).rejects.toThrow(/Unsupported subscribe method: bar/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -577,9 +573,9 @@ describe('ScProvider', () => {
|
|||||||
|
|
||||||
setChainSyncyingStatus(false);
|
setChainSyncyingStatus(false);
|
||||||
|
|
||||||
await expect(provider.unsubscribe('', '', '')).rejects.toThrowError(
|
await expect(
|
||||||
'Unable to find active subscription=::'
|
provider.unsubscribe('', '', '')
|
||||||
);
|
).rejects.toThrow(/Unable to find active subscription/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ export class ScProvider implements ProviderInterface {
|
|||||||
readonly #requests: Map<number, ResponseCallback> = new Map();
|
readonly #requests: Map<number, ResponseCallback> = new Map();
|
||||||
readonly #wellKnownChains: Set<ScType.WellKnownChain>;
|
readonly #wellKnownChains: Set<ScType.WellKnownChain>;
|
||||||
readonly #eventemitter: EventEmitter = new EventEmitter();
|
readonly #eventemitter: EventEmitter = new EventEmitter();
|
||||||
|
|
||||||
#chain: Promise<ScType.Chain> | null = null;
|
#chain: Promise<ScType.Chain> | null = null;
|
||||||
#isChainReady = false;
|
#isChainReady = false;
|
||||||
|
|
||||||
|
|||||||
@@ -67,18 +67,20 @@ export interface ProviderInterface {
|
|||||||
unsubscribe (type: string, method: string, id: number | string): Promise<boolean>;
|
unsubscribe (type: string, method: string, id: number | string): Promise<boolean>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface EndpointStats {
|
||||||
|
bytesRecv: number;
|
||||||
|
bytesSent: number;
|
||||||
|
cached: number;
|
||||||
|
errors: number;
|
||||||
|
requests: number;
|
||||||
|
subscriptions: number;
|
||||||
|
timeout: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ProviderStats {
|
export interface ProviderStats {
|
||||||
active: {
|
active: {
|
||||||
requests: number;
|
requests: number;
|
||||||
subscriptions: number;
|
subscriptions: number;
|
||||||
};
|
};
|
||||||
total: {
|
total: EndpointStats;
|
||||||
bytesRecv: number;
|
|
||||||
bytesSent: number;
|
|
||||||
cached: number;
|
|
||||||
errors: number;
|
|
||||||
requests: number;
|
|
||||||
subscriptions: number;
|
|
||||||
timeout: number;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user