Compare commits

...
27 Commits
Author SHA1 Message Date
github-actions[bot] b9805cdc94 [CI Skip] release/stable 10.0.1
skip-checks: true
2023-03-05 08:50:27 +00:00
Jaco feb36d43a4 10.0.1 (#5518)
* 10.0.1

* Drop extra websocket dep

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

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

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

* Expose endpoint

* Ensure events happen last

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

* Bump deps

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

* Update metadata

* Adjust & actual run

* Bump API

* Rebuild

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

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

* Bump dev
2023-02-22 09:14:43 +02:00
github-actions[bot] 472c971c5b [CI Skip] bump/beta 9.14.3-0-x
skip-checks: true
2023-02-20 15:45:24 +00:00
Jaco d8756455c2 Bump dev deps (#5502) 2023-02-20 17:37:11 +02:00
222 changed files with 10085 additions and 10822 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
steps:
- uses: jacogr/action-merge@d2d64b4545acd93b0a9575177d3d215ae3f92029
with:
checks: build,lint,test
checks: pr (build),pr (lint),pr (test)
labels: -auto
strategy: squash
token: ${{ secrets.GH_PAT_BOT }}
+2 -2
View File
@@ -3,10 +3,10 @@ on: [pull_request]
jobs:
pr:
continue-on-error: true
strategy:
matrix:
step: ['lint', 'test', 'build', 'deno']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
@@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366
- uses: denoland/setup-deno@v1
with:
deno-version: vx.x.x
- name: ${{ matrix.step }}
-1
View File
@@ -10,7 +10,6 @@ jobs:
strategy:
matrix:
step: ['build:release']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
+16
View File
@@ -1,5 +1,21 @@
# 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:
+3 -3
View File
@@ -1,4 +1,4 @@
3374 Jaco 9.14.2 (#5500)
3386 Jaco 10.0.1 (#5518)
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541)
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)
5 Chevdor Fix metadata package link (#3458)
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 Wang fix issue that creates duplicate providers (#983)
4 Alexander Popiak Add asset id in signing (#4009)
4 Andreea Eftene add type overrides (#5506)
4 Joshy Orndorff spelling; efect -> effect (#2295)
4 Julien Eluard Clarified WsProvider constructor parameters documentation (#5404)
4 Nantian fix bigint type (#3869)
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
4 Thibaut Sardan no subscription for http (#3127)
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 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
-19
View File
@@ -1,19 +0,0 @@
// Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
const config = require('@polkadot/dev/config/jest.cjs');
module.exports = {
...config,
moduleNameMapper: {
'@polkadot/api-(augment|base|contract|derive)(.*)$': '<rootDir>/packages/api-$1/src/$2',
// eslint-disable-next-line sort-keys
'@polkadot/api(.*)$': '<rootDir>/packages/api/src/$1',
'@polkadot/rpc-(augment|core|provider)(.*)$': '<rootDir>/packages/rpc-$1/src/$2',
'@polkadot/typegen(.*)$': '<rootDir>/packages/typegen/src/$1',
'@polkadot/types-(augment|codec|create|known|support)(.*)$': '<rootDir>/packages/types-$1/src/$2',
// eslint-disable-next-line sort-keys
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
},
testTimeout: 30000
};
+12 -13
View File
@@ -11,18 +11,18 @@
},
"sideEffects": false,
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"versions": {
"git": "9.14.2",
"npm": "9.14.2"
"git": "10.0.1",
"npm": "10.0.1"
},
"workspaces": [
"packages/*"
],
"scripts": {
"build": "yarn build:interfaces && polkadot-dev-build-ts",
"build:extra": "(cd packages/typegen && copyfiles scripts/* build)",
"build:interfaces": "polkadot-types-internal-interfaces",
"build:extra": "(cd packages/typegen && polkadot-dev-copy-dir scripts build/scripts)",
"build:interfaces": "node --loader @polkadot/dev/node/ts packages/typegen/scripts/polkadot-types-internal-interfaces.mjs",
"build:metadata": "yarn build:interfaces && polkadot-dev-run-test packages/types/src/metadata/v14",
"build:release": "polkadot-ci-ghact-build",
"build:rollup": "polkadot-exec-rollup --config",
@@ -32,18 +32,17 @@
"deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts",
"lint": "polkadot-dev-run-lint",
"postinstall": "polkadot-dev-yarn-only",
"test": "polkadot-dev-run-test --env jest --coverage --forceExit --runInBand ^e2e",
"test": "polkadot-dev-run-test --env node ^e2e",
"test:node": "polkadot-dev-run-test --env node ^e2e",
"test:one": "polkadot-dev-run-test --detectOpenHandles --forceExit"
"test:one": "polkadot-dev-run-test --env node"
},
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/register": "^7.18.9",
"@babel/runtime": "^7.20.13",
"@polkadot/dev": "^0.68.38",
"@babel/core": "^7.21.0",
"@babel/register": "^7.21.0",
"@babel/runtime": "^7.21.0",
"@polkadot/dev": "^0.69.27",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^29.4.0",
"copyfiles": "^2.4.1"
"@types/node": "^18.14.5"
},
"resolutions": {
"typescript": "^4.9.5"
+8 -8
View File
@@ -20,15 +20,15 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/api-base": "9.14.2",
"@polkadot/rpc-augment": "9.14.2",
"@polkadot/types": "9.14.2",
"@polkadot/types-augment": "9.14.2",
"@polkadot/types-codec": "9.14.2",
"@polkadot/util": "^10.4.2"
"@polkadot/api-base": "10.0.1",
"@polkadot/rpc-augment": "10.0.1",
"@polkadot/types": "10.0.1",
"@polkadot/types-augment": "10.0.1",
"@polkadot/types-codec": "10.0.1",
"@polkadot/util": "^11.0.1",
"tslib": "^2.5.0"
}
}
@@ -1120,6 +1120,10 @@ declare module '@polkadot/api-base/types/errors' {
* pool at a time.
**/
AccountBelongsToOtherPool: AugmentedError<ApiType>;
/**
* Bonding extra is restricted to the exact pending reward amount.
**/
BondExtraRestricted: AugmentedError<ApiType>;
/**
* The pools state cannot be changed.
**/
+1 -1
View File
@@ -757,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
* 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
**/
+16 -1
View File
@@ -11,7 +11,7 @@ import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool,
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
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, 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 { 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';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -151,6 +151,17 @@ declare module '@polkadot/api-base/types/storage' {
* epoch.
**/
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.
**/
@@ -958,6 +969,10 @@ declare module '@polkadot/api-base/types/storage' {
* Storage for bonded pools.
**/
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
**/
+47 -10
View File
@@ -11,7 +11,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64,
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -2381,8 +2381,21 @@ declare module '@polkadot/api-base/types/submittable' {
* accumulated rewards, see [`BondExtra`].
*
* Bonding extra funds implies an automatic payout of all pending rewards as well.
* See `bond_extra_other` to bond pending rewards of `other` members.
**/
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
/**
* `origin` bonds funds from `extra` for some pool member `member` into their respective
* pools.
*
* `origin` can bond extra funds from free balance or pending rewards when `origin ==
* other`.
*
* In the case of `origin != other`, `origin` can only bond extra pending rewards of
* `other` members assuming set_claim_permission for the given member is
* `PermissionlessAll` or `PermissionlessCompound`.
**/
bondExtraOther: AugmentedSubmittable<(member: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletNominationPoolsBondExtra]>;
/**
* Chill on behalf of the pool.
*
@@ -2400,8 +2413,17 @@ declare module '@polkadot/api-base/types/submittable' {
*
* The member will earn rewards pro rata based on the members stake vs the sum of the
* members in the pools stake. Rewards do not "expire".
*
* See `claim_payout_other` to caim rewards on bahalf of some `other` pool member.
**/
claimPayout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* `origin` can claim payouts on some pool member `other`'s behalf.
*
* Pool member `other` must have a `PermissionlessAll` or `PermissionlessWithdraw` in order
* for this call to be successful.
**/
claimPayoutOther: AugmentedSubmittable<(other: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Create a new delegation pool.
*
@@ -2414,14 +2436,14 @@ declare module '@polkadot/api-base/types/submittable' {
* creating multiple pools in the same extrinsic.
* * `root` - The account to set as [`PoolRoles::root`].
* * `nominator` - The account to set as the [`PoolRoles::nominator`].
* * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`].
* * `bouncer` - The account to set as the [`PoolRoles::bouncer`].
*
* # Note
*
* In addition to `amount`, the caller will transfer the existential deposit; so the caller
* needs at have at least `amount + existential_deposit` transferrable.
**/
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, stateToggler: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress]>;
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, bouncer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress]>;
/**
* Create a new delegation pool with a previously used pool id
*
@@ -2430,7 +2452,7 @@ declare module '@polkadot/api-base/types/submittable' {
* same as `create` with the inclusion of
* * `pool_id` - `A valid PoolId.
**/
createWithPoolId: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, stateToggler: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress, u32]>;
createWithPoolId: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, bouncer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress, u32]>;
/**
* Stake funds with a pool. The amount to bond is transferred from the member to the
* pools account and immediately increases the pools bond.
@@ -2463,6 +2485,21 @@ declare module '@polkadot/api-base/types/submittable' {
* they attempt to unbond.
**/
poolWithdrawUnbonded: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Allows a pool member to set a claim permission to allow or disallow permissionless
* bonding and withdrawing.
*
* By default, this is `Permissioned`, which implies only the pool member themselves can
* claim their pending rewards. If a pool member wishes so, they can set this to
* `PermissionlessAll` to allow any account to claim their rewards and bond extra to the
* pool.
*
* # Arguments
*
* * `origin` - Member of a pool.
* * `actor` - Account to claim reward. // improve this
**/
setClaimPermission: AugmentedSubmittable<(permission: PalletNominationPoolsClaimPermission | 'Permissioned' | 'PermissionlessCompound' | 'PermissionlessWithdraw' | 'PermissionlessAll' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsClaimPermission]>;
/**
* Update configurations for the nomination pools. The origin for this call must be
* Root.
@@ -2479,7 +2516,7 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* Set a new metadata for the pool.
*
* The dispatch origin of this call must be signed by the state toggler, or the root role
* The dispatch origin of this call must be signed by the bouncer, or the root role
* of the pool.
**/
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
@@ -2491,7 +2528,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* The dispatch origin of this call must be either:
*
* 1. signed by the state toggler, or the root role of the pool,
* 1. signed by the bouncer, or the root role of the pool,
* 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and
* then the state of the pool can be permissionlessly changed to `Destroying`.
**/
@@ -2506,8 +2543,8 @@ declare module '@polkadot/api-base/types/submittable' {
*
* # Conditions for a permissionless dispatch.
*
* * The pool is blocked and the caller is either the root or state-toggler. This is
* refereed to as a kick.
* * The pool is blocked and the caller is either the root or bouncer. This is refereed to
* as a kick.
* * The pool is destroying and the member is not the depositor.
* * The pool is destroying, the member is the depositor and no other members are in the
* pool.
@@ -2539,7 +2576,7 @@ declare module '@polkadot/api-base/types/submittable' {
* It emits an event, notifying UIs of the role change. This event is quite relevant to
* most pool members and they should be informed of changes to pool roles.
**/
updateRoles: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newRoot: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newNominator: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newStateToggler: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32]>;
updateRoles: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newRoot: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newNominator: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newBouncer: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32]>;
/**
* Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an
* error is returned.
@@ -2551,7 +2588,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* * The pool is in destroy mode and the target is not the depositor.
* * The target is the depositor and they are the only member in the sub pools.
* * The pool is blocked and the caller is either the root or state-toggler.
* * The pool is blocked and the caller is either the root or bouncer.
*
* # Conditions for permissioned dispatch
*
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.14.2' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '10.0.1' };
@@ -860,6 +860,10 @@ declare module '@polkadot/api-base/types/errors' {
* pool at a time.
**/
AccountBelongsToOtherPool: AugmentedError<ApiType>;
/**
* Bonding extra is restricted to the exact pending reward amount.
**/
BondExtraRestricted: AugmentedError<ApiType>;
/**
* The pools state cannot be changed.
**/
+1 -1
View File
@@ -574,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
* 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
**/
+16 -1
View File
@@ -11,7 +11,7 @@ import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool,
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
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, 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 { 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';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -151,6 +151,17 @@ declare module '@polkadot/api-base/types/storage' {
* epoch.
**/
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.
**/
@@ -802,6 +813,10 @@ declare module '@polkadot/api-base/types/storage' {
* Storage for bonded pools.
**/
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
**/
+47 -10
View File
@@ -11,7 +11,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64,
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPreimagesBounded, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
import type { FrameSupportPreimagesBounded, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -1941,8 +1941,21 @@ declare module '@polkadot/api-base/types/submittable' {
* accumulated rewards, see [`BondExtra`].
*
* Bonding extra funds implies an automatic payout of all pending rewards as well.
* See `bond_extra_other` to bond pending rewards of `other` members.
**/
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
/**
* `origin` bonds funds from `extra` for some pool member `member` into their respective
* pools.
*
* `origin` can bond extra funds from free balance or pending rewards when `origin ==
* other`.
*
* In the case of `origin != other`, `origin` can only bond extra pending rewards of
* `other` members assuming set_claim_permission for the given member is
* `PermissionlessAll` or `PermissionlessCompound`.
**/
bondExtraOther: AugmentedSubmittable<(member: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletNominationPoolsBondExtra]>;
/**
* Chill on behalf of the pool.
*
@@ -1960,8 +1973,17 @@ declare module '@polkadot/api-base/types/submittable' {
*
* The member will earn rewards pro rata based on the members stake vs the sum of the
* members in the pools stake. Rewards do not "expire".
*
* See `claim_payout_other` to caim rewards on bahalf of some `other` pool member.
**/
claimPayout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* `origin` can claim payouts on some pool member `other`'s behalf.
*
* Pool member `other` must have a `PermissionlessAll` or `PermissionlessWithdraw` in order
* for this call to be successful.
**/
claimPayoutOther: AugmentedSubmittable<(other: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Create a new delegation pool.
*
@@ -1974,14 +1996,14 @@ declare module '@polkadot/api-base/types/submittable' {
* creating multiple pools in the same extrinsic.
* * `root` - The account to set as [`PoolRoles::root`].
* * `nominator` - The account to set as the [`PoolRoles::nominator`].
* * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`].
* * `bouncer` - The account to set as the [`PoolRoles::bouncer`].
*
* # Note
*
* In addition to `amount`, the caller will transfer the existential deposit; so the caller
* needs at have at least `amount + existential_deposit` transferrable.
**/
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, stateToggler: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress]>;
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, bouncer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress]>;
/**
* Create a new delegation pool with a previously used pool id
*
@@ -1990,7 +2012,7 @@ declare module '@polkadot/api-base/types/submittable' {
* same as `create` with the inclusion of
* * `pool_id` - `A valid PoolId.
**/
createWithPoolId: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, stateToggler: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress, u32]>;
createWithPoolId: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, bouncer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress, u32]>;
/**
* Stake funds with a pool. The amount to bond is transferred from the member to the
* pools account and immediately increases the pools bond.
@@ -2023,6 +2045,21 @@ declare module '@polkadot/api-base/types/submittable' {
* they attempt to unbond.
**/
poolWithdrawUnbonded: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Allows a pool member to set a claim permission to allow or disallow permissionless
* bonding and withdrawing.
*
* By default, this is `Permissioned`, which implies only the pool member themselves can
* claim their pending rewards. If a pool member wishes so, they can set this to
* `PermissionlessAll` to allow any account to claim their rewards and bond extra to the
* pool.
*
* # Arguments
*
* * `origin` - Member of a pool.
* * `actor` - Account to claim reward. // improve this
**/
setClaimPermission: AugmentedSubmittable<(permission: PalletNominationPoolsClaimPermission | 'Permissioned' | 'PermissionlessCompound' | 'PermissionlessWithdraw' | 'PermissionlessAll' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsClaimPermission]>;
/**
* Update configurations for the nomination pools. The origin for this call must be
* Root.
@@ -2039,7 +2076,7 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* Set a new metadata for the pool.
*
* The dispatch origin of this call must be signed by the state toggler, or the root role
* The dispatch origin of this call must be signed by the bouncer, or the root role
* of the pool.
**/
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
@@ -2051,7 +2088,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* The dispatch origin of this call must be either:
*
* 1. signed by the state toggler, or the root role of the pool,
* 1. signed by the bouncer, or the root role of the pool,
* 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and
* then the state of the pool can be permissionlessly changed to `Destroying`.
**/
@@ -2066,8 +2103,8 @@ declare module '@polkadot/api-base/types/submittable' {
*
* # Conditions for a permissionless dispatch.
*
* * The pool is blocked and the caller is either the root or state-toggler. This is
* refereed to as a kick.
* * The pool is blocked and the caller is either the root or bouncer. This is refereed to
* as a kick.
* * The pool is destroying and the member is not the depositor.
* * The pool is destroying, the member is the depositor and no other members are in the
* pool.
@@ -2099,7 +2136,7 @@ declare module '@polkadot/api-base/types/submittable' {
* It emits an event, notifying UIs of the role change. This event is quite relevant to
* most pool members and they should be informed of changes to pool roles.
**/
updateRoles: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newRoot: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newNominator: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newStateToggler: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32]>;
updateRoles: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newRoot: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newNominator: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newBouncer: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32]>;
/**
* Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an
* error is returned.
@@ -2111,7 +2148,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* * The pool is in destroy mode and the target is not the depositor.
* * The target is the depositor and they are the only member in the sub pools.
* * The pool is blocked and the caller is either the root or state-toggler.
* * The pool is blocked and the caller is either the root or bouncer.
*
* # Conditions for permissioned dispatch
*
@@ -886,6 +886,18 @@ declare module '@polkadot/api-base/types/errors' {
**/
[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: {
/**
* Attempt to signal GRANDPA change with one already pending.
@@ -1100,6 +1112,13 @@ declare module '@polkadot/api-base/types/errors' {
* The message is queued for future execution.
**/
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
**/
@@ -1320,6 +1339,10 @@ declare module '@polkadot/api-base/types/errors' {
* The duration provided should be less than or equal to `MaxDeadlineDuration`.
**/
WrongDuration: AugmentedError<ApiType>;
/**
* The provided namespace isn't supported in this call.
**/
WrongNamespace: AugmentedError<ApiType>;
/**
* The extrinsic was sent by the wrong origin.
**/
@@ -1414,6 +1437,10 @@ declare module '@polkadot/api-base/types/errors' {
* pool at a time.
**/
AccountBelongsToOtherPool: AugmentedError<ApiType>;
/**
* Bonding extra is restricted to the exact pending reward amount.
**/
BondExtraRestricted: AugmentedError<ApiType>;
/**
* The pools state cannot be changed.
**/
+28 -6
View File
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscAttributeNamespace, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyMetadataOwner, 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>;
@@ -604,6 +604,24 @@ declare module '@polkadot/api-base/types/events' {
**/
[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: {
/**
* New authority set has been applied.
@@ -736,19 +754,19 @@ declare module '@polkadot/api-base/types/events' {
/**
* 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.
**/
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.
**/
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).
**/
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
**/
@@ -890,6 +908,10 @@ declare module '@polkadot/api-base/types/events' {
* Ownership acceptance has changed for an account.
**/
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.
**/
@@ -993,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
* 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
**/
+39 -4
View File
@@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
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, 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, 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';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -668,6 +668,37 @@ declare module '@polkadot/api-base/types/storage' {
**/
[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: {
/**
* The number of changes (both in terms of keys and underlying economic responsibilities)
@@ -819,15 +850,15 @@ declare module '@polkadot/api-base/types/storage' {
/**
* 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.
**/
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.
**/
serviceHead: AugmentedQuery<ApiType, () => Observable<Option<PalletMessageQueueMockHelpersMessageOrigin>>, []> & QueryableStorageEntry<ApiType, []>;
serviceHead: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
@@ -965,6 +996,10 @@ declare module '@polkadot/api-base/types/storage' {
* Storage for bonded pools.
**/
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
**/
+94 -12
View File
@@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, FrameSupportTokensMiscAttributeNamespace, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletContractsWasmDeterminism, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMessageQueueMockHelpersMessageOrigin, PalletMultisigTimepoint, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, FrameSupportTokensMiscAttributeNamespace, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletContractsWasmDeterminism, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -2000,6 +2000,32 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
glutton: {
/**
* Initializes the pallet by writing into `TrashData`.
*
* Only callable by Root. A good default for `trash_count` is `5_000`.
**/
initializePallet: AugmentedSubmittable<(newCount: u32 | AnyNumber | Uint8Array, witnessCount: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [u32, Option<u32>]>;
/**
* Set the `Compute` storage value that determines how much of the
* block's weight `ref_time` to use during `on_idle`.
*
* Only callable by Root.
**/
setCompute: AugmentedSubmittable<(compute: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Perbill]>;
/**
* Set the `Storage` storage value that determines the PoV size usage
* for each block.
*
* Only callable by Root.
**/
setStorage: AugmentedSubmittable<(storage: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Perbill]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
grandpa: {
/**
* Note that the current authority set of the GRANDPA finality gadget has stalled.
@@ -2425,6 +2451,9 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* Execute an overweight message.
*
* Temporary processing errors will be propagated whereas permanent errors are treated
* as success condition.
*
* - `origin`: Must be `Signed`.
* - `message_origin`: The origin from which the message to be executed arrived.
* - `page`: The page in the queue in which the message to be executed is sitting.
@@ -2434,11 +2463,11 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Benchmark complexity considerations: O(index + weight_limit).
**/
executeOverweight: AugmentedSubmittable<(messageOrigin: PalletMessageQueueMockHelpersMessageOrigin | { Here: any } | { There: any } | { Everywhere: any } | string | Uint8Array, page: u32 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array, weightLimit: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletMessageQueueMockHelpersMessageOrigin, u32, u32, SpWeightsWeightV2Weight]>;
executeOverweight: AugmentedSubmittable<(messageOrigin: u32 | AnyNumber | Uint8Array, page: u32 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array, weightLimit: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u32, SpWeightsWeightV2Weight]>;
/**
* Remove a page which has no more messages remaining to be processed or is stale.
**/
reapPage: AugmentedSubmittable<(messageOrigin: PalletMessageQueueMockHelpersMessageOrigin | { Here: any } | { There: any } | { Everywhere: any } | string | Uint8Array, pageIndex: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletMessageQueueMockHelpersMessageOrigin, u32]>;
reapPage: AugmentedSubmittable<(messageOrigin: u32 | AnyNumber | Uint8Array, pageIndex: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Generic tx
**/
@@ -3032,6 +3061,22 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(1)`
**/
setAttribute: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, maybeItem: Option<u32> | null | Uint8Array | u32 | AnyNumber, namespace: FrameSupportTokensMiscAttributeNamespace | { Pallet: any } | { CollectionOwner: any } | { ItemOwner: any } | { Account: any } | string | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<u32>, FrameSupportTokensMiscAttributeNamespace, Bytes, Bytes]>;
/**
* Set attributes for an item by providing the pre-signed approval.
*
* Origin must be Signed and must be an owner of the `data.item`.
*
* - `data`: The pre-signed approval that consists of the information about the item,
* attributes to update and until what block number.
* - `signature`: The signature of the `data` object.
* - `signer`: The `data` object's signer. Should be an owner of the collection for the
* `CollectionOwner` namespace.
*
* Emits `AttributeSet` for each provided attribute.
* Emits `ItemAttributesApprovalAdded` if the approval wasn't set before.
* Emits `PreSignedAttributesSet` on success.
**/
setAttributesPreSigned: AugmentedSubmittable<(data: PalletNftsPreSignedAttributes | { collection?: any; item?: any; attributes?: any; namespace?: any; deadline?: any } | string | Uint8Array, signature: SpRuntimeMultiSignature | { Ed25519: any } | { Sr25519: any } | { Ecdsa: any } | string | Uint8Array, signer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNftsPreSignedAttributes, SpRuntimeMultiSignature, AccountId32]>;
/**
* Set the maximum number of items a collection could have.
*
@@ -3245,8 +3290,21 @@ declare module '@polkadot/api-base/types/submittable' {
* accumulated rewards, see [`BondExtra`].
*
* Bonding extra funds implies an automatic payout of all pending rewards as well.
* See `bond_extra_other` to bond pending rewards of `other` members.
**/
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
/**
* `origin` bonds funds from `extra` for some pool member `member` into their respective
* pools.
*
* `origin` can bond extra funds from free balance or pending rewards when `origin ==
* other`.
*
* In the case of `origin != other`, `origin` can only bond extra pending rewards of
* `other` members assuming set_claim_permission for the given member is
* `PermissionlessAll` or `PermissionlessCompound`.
**/
bondExtraOther: AugmentedSubmittable<(member: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletNominationPoolsBondExtra]>;
/**
* Chill on behalf of the pool.
*
@@ -3264,8 +3322,17 @@ declare module '@polkadot/api-base/types/submittable' {
*
* The member will earn rewards pro rata based on the members stake vs the sum of the
* members in the pools stake. Rewards do not "expire".
*
* See `claim_payout_other` to caim rewards on bahalf of some `other` pool member.
**/
claimPayout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* `origin` can claim payouts on some pool member `other`'s behalf.
*
* Pool member `other` must have a `PermissionlessAll` or `PermissionlessWithdraw` in order
* for this call to be successful.
**/
claimPayoutOther: AugmentedSubmittable<(other: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Create a new delegation pool.
*
@@ -3278,14 +3345,14 @@ declare module '@polkadot/api-base/types/submittable' {
* creating multiple pools in the same extrinsic.
* * `root` - The account to set as [`PoolRoles::root`].
* * `nominator` - The account to set as the [`PoolRoles::nominator`].
* * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`].
* * `bouncer` - The account to set as the [`PoolRoles::bouncer`].
*
* # Note
*
* In addition to `amount`, the caller will transfer the existential deposit; so the caller
* needs at have at least `amount + existential_deposit` transferrable.
**/
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, stateToggler: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress]>;
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, bouncer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress]>;
/**
* Create a new delegation pool with a previously used pool id
*
@@ -3294,7 +3361,7 @@ declare module '@polkadot/api-base/types/submittable' {
* same as `create` with the inclusion of
* * `pool_id` - `A valid PoolId.
**/
createWithPoolId: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, stateToggler: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress, u32]>;
createWithPoolId: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, bouncer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress, u32]>;
/**
* Stake funds with a pool. The amount to bond is transferred from the member to the
* pools account and immediately increases the pools bond.
@@ -3327,6 +3394,21 @@ declare module '@polkadot/api-base/types/submittable' {
* they attempt to unbond.
**/
poolWithdrawUnbonded: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Allows a pool member to set a claim permission to allow or disallow permissionless
* bonding and withdrawing.
*
* By default, this is `Permissioned`, which implies only the pool member themselves can
* claim their pending rewards. If a pool member wishes so, they can set this to
* `PermissionlessAll` to allow any account to claim their rewards and bond extra to the
* pool.
*
* # Arguments
*
* * `origin` - Member of a pool.
* * `actor` - Account to claim reward. // improve this
**/
setClaimPermission: AugmentedSubmittable<(permission: PalletNominationPoolsClaimPermission | 'Permissioned' | 'PermissionlessCompound' | 'PermissionlessWithdraw' | 'PermissionlessAll' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsClaimPermission]>;
/**
* Update configurations for the nomination pools. The origin for this call must be
* Root.
@@ -3343,7 +3425,7 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* Set a new metadata for the pool.
*
* The dispatch origin of this call must be signed by the state toggler, or the root role
* The dispatch origin of this call must be signed by the bouncer, or the root role
* of the pool.
**/
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
@@ -3355,7 +3437,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* The dispatch origin of this call must be either:
*
* 1. signed by the state toggler, or the root role of the pool,
* 1. signed by the bouncer, or the root role of the pool,
* 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and
* then the state of the pool can be permissionlessly changed to `Destroying`.
**/
@@ -3370,8 +3452,8 @@ declare module '@polkadot/api-base/types/submittable' {
*
* # Conditions for a permissionless dispatch.
*
* * The pool is blocked and the caller is either the root or state-toggler. This is
* refereed to as a kick.
* * The pool is blocked and the caller is either the root or bouncer. This is refereed to
* as a kick.
* * The pool is destroying and the member is not the depositor.
* * The pool is destroying, the member is the depositor and no other members are in the
* pool.
@@ -3403,7 +3485,7 @@ declare module '@polkadot/api-base/types/submittable' {
* It emits an event, notifying UIs of the role change. This event is quite relevant to
* most pool members and they should be informed of changes to pool roles.
**/
updateRoles: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newRoot: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newNominator: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newStateToggler: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32]>;
updateRoles: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newRoot: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newNominator: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newBouncer: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32]>;
/**
* Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an
* error is returned.
@@ -3415,7 +3497,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* * The pool is in destroy mode and the target is not the depositor.
* * The target is the depositor and they are the only member in the sub pools.
* * The pool is blocked and the caller is either the root or state-toggler.
* * The pool is blocked and the caller is either the root or bouncer.
*
* # Conditions for permissioned dispatch
*
+6 -6
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/rpc-core": "9.14.2",
"@polkadot/types": "9.14.2",
"@polkadot/util": "^10.4.2",
"rxjs": "^7.8.0"
"@polkadot/rpc-core": "10.0.1",
"@polkadot/types": "10.0.1",
"@polkadot/util": "^11.0.1",
"rxjs": "^7.8.0",
"tslib": "^2.5.0"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.14.2' };
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.0.1' };
+11 -11
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/api": "9.14.2",
"@polkadot/types": "9.14.2",
"@polkadot/types-codec": "9.14.2",
"@polkadot/types-create": "9.14.2",
"@polkadot/util": "^10.4.2",
"@polkadot/util-crypto": "^10.4.2",
"rxjs": "^7.8.0"
"@polkadot/api": "10.0.1",
"@polkadot/types": "10.0.1",
"@polkadot/types-codec": "10.0.1",
"@polkadot/types-create": "10.0.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"rxjs": "^7.8.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/api-augment": "9.14.2",
"@polkadot/keyring": "^10.4.2"
"@polkadot/api-augment": "10.0.1",
"@polkadot/keyring": "^11.0.1"
}
}
+23 -18
View File
@@ -1,11 +1,14 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
// 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 fs from 'fs';
import path from 'path';
import process from 'process';
import fs from 'node:fs';
import path from 'node:path';
import process from 'node:process';
import { TypeDefInfo } from '@polkadot/types/types';
import { blake2AsHex } from '@polkadot/util-crypto';
@@ -86,24 +89,26 @@ describe('Abi', (): void => {
});
describe('TypeDef', (): void => {
it.each(Object.keys(abis))('initializes from a contract ABI: %s', (abiName): void => {
const abi = new Abi(abis[abiName]);
const json = stringifyJson(abi.registry);
const cmpFile = path.join(cmpPath, `${abiName}.test.json`);
const cmpText = fs.readFileSync(cmpFile, 'utf-8');
for (const [abiName, abiJson] of Object.entries(abis)) {
it(`initializes from a contract ABI: ${abiName}`, (): void => {
const abi = new Abi(abiJson);
const registryJson = stringifyJson(abi.registry);
const cmpFile = path.join(cmpPath, `${abiName}.test.json`);
const cmpText = fs.readFileSync(cmpFile, 'utf-8');
try {
expect(JSON.parse(json)).toEqual(JSON.parse(cmpText));
} catch (error) {
if (process.env.GITHUB_REPOSITORY) {
console.error(json);
try {
expect(JSON.parse(registryJson)).toEqual(JSON.parse(cmpText));
} catch (error) {
if (process.env.GITHUB_REPOSITORY) {
console.error(registryJson);
throw error;
throw error;
}
fs.writeFileSync(cmpFile, registryJson, { flag: 'w' });
}
fs.writeFileSync(cmpFile, json, { flag: 'w' });
}
});
});
}
});
it('has the correct hash for the source', (): void => {
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
// 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 abis from '../test/contracts';
+1 -1
View File
@@ -11,7 +11,7 @@ import { v3ToV4 } from './toV4';
// The versions where an enum is used, aka V0 is missing
// (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';
+2 -2
View File
@@ -23,11 +23,11 @@ interface ArgsEntry <T extends WithArgs> extends NamedEntry {
args: GetArgsType<T>['args'][0][];
}
const ARG_TYPES = <const> {
const ARG_TYPES = {
ContractConstructorSpec: 'ContractMessageParamSpecV2',
ContractEventSpec: 'ContractEventParamSpecV2',
ContractMessageSpec: 'ContractMessageParamSpecV2'
};
} as const;
function v1ToV2Label (entry: NamedEntry): { label: Text } {
return objectSpread({}, entry, {
+6 -3
View File
@@ -1,9 +1,12 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import fs from 'fs';
import path from 'path';
import process from 'process';
// eslint-disable-next-line spaced-comment
/// <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';
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.14.2' };
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.0.1' };
+16 -16
View File
@@ -20,25 +20,25 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/api": "9.14.2",
"@polkadot/api-augment": "9.14.2",
"@polkadot/api-base": "9.14.2",
"@polkadot/rpc-core": "9.14.2",
"@polkadot/types": "9.14.2",
"@polkadot/types-codec": "9.14.2",
"@polkadot/util": "^10.4.2",
"@polkadot/util-crypto": "^10.4.2",
"rxjs": "^7.8.0"
"@polkadot/api": "10.0.1",
"@polkadot/api-augment": "10.0.1",
"@polkadot/api-base": "10.0.1",
"@polkadot/rpc-core": "10.0.1",
"@polkadot/types": "10.0.1",
"@polkadot/types-codec": "10.0.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"rxjs": "^7.8.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/api": "9.14.2",
"@polkadot/api-augment": "9.14.2",
"@polkadot/rpc-augment": "9.14.2",
"@polkadot/rpc-provider": "9.14.2",
"@polkadot/types-support": "9.14.2"
"@polkadot/api": "10.0.1",
"@polkadot/api-augment": "10.0.1",
"@polkadot/rpc-augment": "10.0.1",
"@polkadot/rpc-provider": "10.0.1",
"@polkadot/types-support": "10.0.1"
}
}
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
// 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 { Bytes, Option, StorageKey } from '@polkadot/types';
import type { Bounty, BountyIndex, Proposal, ProposalIndex } from '@polkadot/types/interfaces';
+9 -2
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
// 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-call */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
@@ -39,7 +42,9 @@ describe('derive', (): void => {
describe('builtin', (): void => {
const api = new ApiRx({ provider: new MockProvider(registry), registry });
beforeAll(() => waitReady(api));
beforeAll(async () => {
await waitReady(api);
});
afterAll(() => api.disconnect());
testFunction(api)('accounts', 'idAndIndex', []);
@@ -82,7 +87,9 @@ describe('derive', (): void => {
throwOnConnect: true
});
beforeAll(() => waitReady(api));
beforeAll(async () => {
await waitReady(api);
});
afterAll(() => api.disconnect());
// override
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '9.14.2' };
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
// 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 { TypeRegistry } from '@polkadot/types/create';
+19 -19
View File
@@ -20,29 +20,29 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/api-augment": "9.14.2",
"@polkadot/api-base": "9.14.2",
"@polkadot/api-derive": "9.14.2",
"@polkadot/keyring": "^10.4.2",
"@polkadot/rpc-augment": "9.14.2",
"@polkadot/rpc-core": "9.14.2",
"@polkadot/rpc-provider": "9.14.2",
"@polkadot/types": "9.14.2",
"@polkadot/types-augment": "9.14.2",
"@polkadot/types-codec": "9.14.2",
"@polkadot/types-create": "9.14.2",
"@polkadot/types-known": "9.14.2",
"@polkadot/util": "^10.4.2",
"@polkadot/util-crypto": "^10.4.2",
"@polkadot/api-augment": "10.0.1",
"@polkadot/api-base": "10.0.1",
"@polkadot/api-derive": "10.0.1",
"@polkadot/keyring": "^11.0.1",
"@polkadot/rpc-augment": "10.0.1",
"@polkadot/rpc-core": "10.0.1",
"@polkadot/rpc-provider": "10.0.1",
"@polkadot/types": "10.0.1",
"@polkadot/types-augment": "10.0.1",
"@polkadot/types-codec": "10.0.1",
"@polkadot/types-create": "10.0.1",
"@polkadot/types-known": "10.0.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"eventemitter3": "^5.0.0",
"rxjs": "^7.8.0"
"rxjs": "^7.8.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/api-augment": "9.14.2",
"@polkadot/types-support": "9.14.2"
"@polkadot/api-augment": "10.0.1",
"@polkadot/types-support": "10.0.1"
}
}
+3 -1
View File
@@ -373,6 +373,8 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
}
private _subscribeHealth (): void {
this._unsubscribeHealth();
// Only enable the health keepalive on WS, not needed on HTTP
this.#healthTimer = this.hasSubscriptions
? setInterval((): void => {
@@ -428,7 +430,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
#onProviderDisconnect (): void {
this._isConnected.next(false);
this._unsubscribeHealth();
this._unsubscribe();
this.emit('disconnected');
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '9.14.2' };
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '10.0.1' };
+80 -69
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/api authors & contributors
// 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 { Combinator } from './Combinator';
@@ -19,81 +22,89 @@ describe('Combinator', (): void => {
fns = [];
});
it('it triggers on all values', (done): void => {
let count = 0;
const combinator = new Combinator(
[storeFn],
(value: any[]): void => {
expect(value[0]).toEqual(`test${count}`);
it('it triggers on all values', async (): Promise<void> => {
await new Promise<boolean>((resolve) => {
let count = 0;
const combinator = new Combinator(
[storeFn],
(value: any[]): void => {
expect(value[0]).toEqual(`test${count}`);
count++;
count++;
if (count === 3) {
done();
if (count === 3) {
resolve(true);
}
}
}
);
);
fns[0]('test0');
fns[0]('test1');
fns[0]('test2');
fns[0]('test0');
fns[0]('test1');
fns[0]('test2');
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
expect(combinator).toBeDefined();
});
});
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();
});
});
});
+4 -1
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/api authors & contributors
// 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 { SubmittableExtrinsic } from '../types';
@@ -101,7 +104,7 @@ describe('ApiPromise', (): void => {
await api.disconnect();
fail('Expected an error but none occurred.');
throw new Error('Expected an error but none occurred.');
} catch {
// Pass
}
+4 -1
View File
@@ -1,10 +1,13 @@
// Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import { augmentObject } from './augmentObject';
describe('augmentObject', (): void => {
let spy: jest.SpyInstance;
let spy: ReturnType<typeof jest.spyOn>;
beforeEach((): void => {
spy = jest.spyOn(console, 'warn');
+3
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/api authors & contributors
// 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 metaStatic from '@polkadot/types-support/metadata/static-substrate';
+6 -6
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/rpc-core": "9.14.2",
"@polkadot/types": "9.14.2",
"@polkadot/types-codec": "9.14.2",
"@polkadot/util": "^10.4.2"
"@polkadot/rpc-core": "10.0.1",
"@polkadot/types": "10.0.1",
"@polkadot/types-codec": "10.0.1",
"@polkadot/util": "^11.0.1",
"tslib": "^2.5.0"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '9.14.2' };
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '10.0.1' };
+9 -9
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/rpc-augment": "9.14.2",
"@polkadot/rpc-provider": "9.14.2",
"@polkadot/types": "9.14.2",
"@polkadot/util": "^10.4.2",
"rxjs": "^7.8.0"
"@polkadot/rpc-augment": "10.0.1",
"@polkadot/rpc-provider": "10.0.1",
"@polkadot/types": "10.0.1",
"@polkadot/util": "^11.0.1",
"rxjs": "^7.8.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/keyring": "^10.4.2",
"@polkadot/rpc-augment": "9.14.2"
"@polkadot/keyring": "^11.0.1",
"@polkadot/rpc-augment": "10.0.1"
}
}
+29 -20
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// 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 { createTestPairs } from '@polkadot/keyring/testingPairs';
@@ -52,24 +55,26 @@ describe('Cached Observables', (): void => {
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 sub1 = observable1.subscribe();
sub1.unsubscribe();
setTimeout((): void => {
const observable2 = rpc.chain.subscribeNewHeads();
const sub2 = observable2.subscribe();
await new Promise<boolean>((resolve) => {
setTimeout((): void => {
const observable2 = rpc.chain.subscribeNewHeads();
const sub2 = observable2.subscribe();
expect(observable1).toBe(observable2);
expect(observable1).toBe(observable2);
sub2.unsubscribe();
done();
}, 500);
sub2.unsubscribe();
resolve(true);
}, 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 observable2 = rpc.chain.subscribeNewHeads();
const sub1 = observable1.subscribe();
@@ -80,13 +85,15 @@ describe('Cached Observables', (): void => {
sub1.unsubscribe();
sub2.unsubscribe();
setTimeout((): void => {
// No more subscribers, now create a new observable
const observable3 = rpc.chain.subscribeNewHeads();
await new Promise<boolean>((resolve) => {
setTimeout((): void => {
// No more subscribers, now create a new observable
const observable3 = rpc.chain.subscribeNewHeads();
expect(observable3).not.toBe(observable1);
done();
}, 3500);
expect(observable3).not.toBe(observable1);
resolve(true);
}, 3500);
});
});
it('creates different observables for different methods but same arguments', (): void => {
@@ -104,7 +111,7 @@ describe('Cached Observables', (): void => {
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 sub = observable1.subscribe((): void => {
@@ -113,9 +120,11 @@ describe('Cached Observables', (): void => {
expect(rpc.chain.getBlockHash(123)).toBe(observable1);
setTimeout((): void => {
expect(rpc.chain.getBlockHash(123)).not.toBe(observable1);
done();
}, 3500);
await new Promise<boolean>((resolve) => {
setTimeout((): void => {
expect(rpc.chain.getBlockHash(123)).not.toBe(observable1);
resolve(true);
}, 3500);
});
});
});
+3
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// 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 { MockProvider } from '@polkadot/rpc-provider/mock';
+22 -15
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// 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 { DefinitionRpc } from '@polkadot/types/types';
@@ -39,31 +42,35 @@ describe('methodSend', (): void => {
rpc = new RpcCore('987', registry, provider);
});
it('checks for mismatched parameters', (done): void => {
it('checks for mismatched parameters', async (): Promise<void> => {
// private method
// 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);
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
method(1).subscribe(
(): void => undefined,
(error: Error): void => {
expect(error.message).toMatch(/parameters, 1 found instead/);
done();
});
await new Promise<boolean>((resolve) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
method(1).subscribe(
(): void => undefined,
(error: Error): void => {
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
// 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);
// Args are length-prefixed, because it's a Bytes
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
method(new Uint8Array([2 << 2, 0x12, 0x34])).subscribe((): void => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(provider.send).toHaveBeenCalledWith('test_blah', ['0x1234'], false);
done();
await new Promise<boolean>((resolve) => {
// Args are length-prefixed, because it's a Bytes
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
method(new Uint8Array([2 << 2, 0x12, 0x34])).subscribe((): void => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(provider.send).toHaveBeenCalledWith('test_blah', ['0x1234'], false);
resolve(true);
});
});
});
});
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '9.14.2' };
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '10.0.1' };
+33 -24
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// 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 { MockProvider } from '@polkadot/rpc-provider/mock';
@@ -22,17 +25,19 @@ describe('replay', (): void => {
await provider.disconnect();
});
it('returns the observable value', (done): void => {
rpc.system.chain().subscribe((value: any): void => {
if (value) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
expect(value.toString()).toEqual('mockChain'); // Defined in MockProvider
done();
}
it('returns the observable value', async (): Promise<void> => {
await new Promise<boolean>((resolve) => {
rpc.system.chain().subscribe((value: any): void => {
if (value) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
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();
let a: any | undefined;
@@ -40,28 +45,32 @@ describe('replay', (): void => {
a = value;
});
setTimeout((): void => {
// Subscribe again to the same observable, it should fire value immediately
observable.subscribe((value: any): void => {
expect(value).toEqual(a);
done();
});
}, 1000);
await new Promise<boolean>((resolve) => {
setTimeout((): void => {
// Subscribe again to the same observable, it should fire value immediately
observable.subscribe((value: any): void => {
expect(value).toEqual(a);
resolve(true);
});
}, 1000);
});
});
it('unsubscribes as required', (done): void => {
it('unsubscribes as required', async (): Promise<void> => {
// eslint-disable-next-line @typescript-eslint/unbound-method
rpc.provider.unsubscribe = jest.fn();
const subscription = rpc.chain.subscribeNewHeads().subscribe((): void => {
subscription.unsubscribe();
await new Promise<boolean>((resolve) => {
const subscription = rpc.chain.subscribeNewHeads().subscribe((): void => {
subscription.unsubscribe();
// There's a promise inside .unsubscribe(), wait a bit (> 2s)
setTimeout((): void => {
// eslint-disable-next-line @typescript-eslint/unbound-method
expect(rpc.provider.unsubscribe).toHaveBeenCalled();
done();
}, 3500);
// There's a promise inside .unsubscribe(), wait a bit (> 2s)
setTimeout((): void => {
// eslint-disable-next-line @typescript-eslint/unbound-method
expect(rpc.provider.unsubscribe).toHaveBeenCalled();
resolve(true);
}, 3500);
});
});
});
});
+27 -18
View File
@@ -1,42 +1,51 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import { of, timer } from 'rxjs';
import { drr } from '.';
describe('drr', (): void => {
it('should not fire twice the same value', (done): void => {
it('should not fire twice the same value', async (): Promise<void> => {
let count = 0;
const sub = of(1, 1).pipe(drr({ delay: 500 })).subscribe((): void => {
++count;
});
setTimeout((): void => {
expect(count).toBe(1);
sub.unsubscribe();
await new Promise<boolean>((resolve) => {
setTimeout((): void => {
expect(count).toBe(1);
sub.unsubscribe();
setTimeout(done, 2000);
}, 50);
setTimeout(() => {
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 sub = obs.subscribe(); // Fire the observable
// Subscribe another time after some time, i.e. after the observable has fired
setTimeout((): void => {
const sub = obs.subscribe((value): void => {
expect(value > 1).toBe(true);
await new Promise<boolean>((resolve) => {
// Subscribe another time after some time, i.e. after the observable has fired
setTimeout((): void => {
const sub = obs.subscribe((value): void => {
expect(value > 1).toBe(true);
setTimeout(done, 2000);
});
setTimeout(() => {
resolve(true);
}, 2000);
});
sub.unsubscribe();
}, 500);
sub.unsubscribe();
}, 500);
sub.unsubscribe();
});
});
});
+13 -13
View File
@@ -20,26 +20,26 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/keyring": "^10.4.2",
"@polkadot/types": "9.14.2",
"@polkadot/types-support": "9.14.2",
"@polkadot/util": "^10.4.2",
"@polkadot/util-crypto": "^10.4.2",
"@polkadot/x-fetch": "^10.4.2",
"@polkadot/x-global": "^10.4.2",
"@polkadot/x-ws": "^10.4.2",
"@polkadot/keyring": "^11.0.1",
"@polkadot/types": "10.0.1",
"@polkadot/types-support": "10.0.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"@polkadot/x-fetch": "^11.0.1",
"@polkadot/x-global": "^11.0.1",
"@polkadot/x-ws": "^11.0.1",
"eventemitter3": "^5.0.0",
"mock-socket": "^9.2.1",
"nock": "^13.3.0"
"nock": "^13.3.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@substrate/connect": "0.7.19"
"@substrate/connect": "0.7.20"
},
"optionalDependencies": {
"@substrate/connect": "0.7.19"
"@substrate/connect": "0.7.20"
}
}
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// 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 { RpcCoder } from '.';
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import { RpcCoder } from '.';
describe('encodeJson', (): void => {
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import { RpcCoder } from '.';
describe('encodeObject', (): void => {
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// 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 RpcError from './error';
+7 -4
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// 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 { HttpProvider } from './';
@@ -41,16 +44,16 @@ describe('Http', (): void => {
expect(http.isConnected).toEqual(true);
});
it('does not (yet) support subscribe', (): Promise<number | void> => {
return http.subscribe('', '', [], (cb): void => {
it('does not (yet) support subscribe', async (): Promise<void> => {
await http.subscribe('', '', [], (cb): void => {
expect(cb).toEqual(expect.anything());
}).catch((error): void => {
expect((error as Error).message).toMatch(/does not have subscriptions/);
});
});
it('does not (yet) support unsubscribe', (): Promise<boolean | void> => {
return http.unsubscribe('', '', 0).catch((error): void => {
it('does not (yet) support unsubscribe', async (): Promise<void> => {
await http.unsubscribe('', '', 0).catch((error): void => {
expect((error as Error).message).toMatch(/does not have subscriptions/);
});
});
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// 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 { mockHttp, TEST_HTTP_URL } from '../mock/mockHttp';
+3
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import { LRUCache } from './lru';
describe('LRUCache', (): void => {
+16 -11
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// 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 { TypeRegistry } from '@polkadot/types/create';
@@ -19,20 +22,22 @@ describe('on', (): void => {
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 handler = (type: ProviderInterfaceEmitted): void => {
mock.on(type, (): void => {
events[type] = true;
await new Promise<boolean>((resolve) => {
const handler = (type: ProviderInterfaceEmitted): void => {
mock.on(type, (): void => {
events[type] = true;
if (Object.values(events).filter((value): boolean => value).length === 2) {
done();
}
});
};
if (Object.values(events).filter((value): boolean => value).length === 2) {
resolve(true);
}
});
};
handler('connected');
handler('disconnected');
handler('connected');
handler('disconnected');
});
});
});
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// 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 { MockProvider } from '.';
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// 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 { MockProvider } from './';
@@ -17,53 +20,59 @@ describe('subscribe', (): void => {
await mock.disconnect();
});
it('fails on unknown methods', (): Promise<number | void> => {
return mock
it('fails on unknown methods', async (): Promise<void> => {
await mock
.subscribe('test', 'test_notFound')
.catch((error): void => {
expect((error as Error).message).toMatch(/Invalid method 'test_notFound'/);
});
});
it('returns a subscription id', (): Promise<void> => {
return mock
it('returns a subscription id', async (): Promise<void> => {
await mock
.subscribe('chain_newHead', 'chain_subscribeNewHead', (): void => undefined)
.then((id): void => {
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.subscriptions.chain_subscribeNewHead.lastValue = 'testValue';
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, value: string): void => {
expect(value).toEqual('testValue');
done();
}).catch(console.error);
await new Promise<boolean>((resolve) => {
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, value: string): void => {
expect(value).toEqual('testValue');
resolve(true);
}).catch(console.error);
});
});
it('calls back with new headers', (done): void => {
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, header: { number: number }): void => {
if (header.number === 4) {
done();
}
}).catch(console.error);
it('calls back with new headers', async (): Promise<void> => {
await new Promise<boolean>((resolve) => {
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, header: { number: number }): void => {
if (header.number === 4) {
resolve(true);
}
}).catch(console.error);
});
});
it('handles errors withing callbacks gracefully', (done): void => {
it('handles errors within callbacks gracefully', async (): Promise<void> => {
let hasThrown = false;
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, header: { number: number }): void => {
if (!hasThrown) {
hasThrown = true;
await new Promise<boolean>((resolve) => {
mock.subscribe('chain_newHead', 'chain_subscribeNewHead', (_: any, header: { number: number }): void => {
if (!hasThrown) {
hasThrown = true;
throw new Error('testing');
}
throw new Error('testing');
}
if (header.number === 3) {
done();
}
}).catch(console.error);
if (header.number === 3) {
resolve(true);
}
}).catch(console.error);
});
});
});
+2 -4
View File
@@ -2,11 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
import type { Server } from 'mock-socket';
import type { Constructor } from '@polkadot/types/types';
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
export interface Global extends NodeJS.Global {
WebSocket: Constructor<WebSocket>;
export type Global = typeof globalThis & {
WebSocket: typeof WebSocket;
fetch: any;
}
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// 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 { MockProvider } from '.';
@@ -24,8 +27,8 @@ describe('unsubscribe', (): void => {
await mock.disconnect();
});
it('fails on unknown ids', (): Promise<boolean> => {
return mock
it('fails on unknown ids', async (): Promise<void> => {
await mock
.unsubscribe('chain_newHead', 'chain_subscribeNewHead', 5)
.catch((error): boolean => {
expect((error as Error).message).toMatch(/Unable to find/);
@@ -34,12 +37,12 @@ describe('unsubscribe', (): void => {
});
});
it('unsubscribes successfully', (): Promise<boolean> => {
return mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id);
it('unsubscribes successfully', async (): Promise<void> => {
await mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id);
});
it('fails on double unsubscribe', (): Promise<boolean> => {
return mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id)
it('fails on double unsubscribe', async (): Promise<void> => {
await mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id)
.then((): Promise<boolean> =>
mock.unsubscribe('chain_newHead', 'chain_subscribeNewHead', id)
)
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '9.14.2' };
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
// 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 promise/param-names */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
+11 -9
View File
@@ -67,18 +67,20 @@ export interface ProviderInterface {
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 {
active: {
requests: number;
subscriptions: number;
};
total: {
bytesRecv: number;
bytesSent: number;
cached: number;
errors: number;
requests: number;
subscriptions: number;
timeout: number;
};
total: EndpointStats;
}
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// 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 { mockWs } from '../mock/mockWs';
+11 -13
View File
@@ -22,22 +22,20 @@ const known: Record<number, string> = {
1015: 'TLS Handshake'
};
function getUnmapped (code: number): string | void {
if (code <= 1999) {
return '(For WebSocket standard)';
} else if (code <= 2999) {
return '(For WebSocket extensions)';
} else if (code <= 3999) {
return '(For libraries and frameworks)';
} else if (code <= 4999) {
return '(For applications)';
}
}
export function getWSErrorString (code: number): string {
if (code >= 0 && code <= 999) {
return '(Unused)';
} else if (code >= 1016) {
if (code <= 1999) {
return '(For WebSocket standard)';
} else if (code <= 2999) {
return '(For WebSocket extensions)';
} else if (code <= 3999) {
return '(For libraries and frameworks)';
} else if (code <= 4999) {
return '(For applications)';
}
}
return known[code] || getUnmapped(code) || '(Unknown)';
return known[code] || '(Unknown)';
}
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import type { Request } from '../mock/mockWs';
import { mockWs } from '../mock/mockWs';
+43 -21
View File
@@ -3,7 +3,7 @@
/* eslint-disable camelcase */
import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted, ProviderStats } from '../types';
import type { EndpointStats, JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted, ProviderStats } from '../types';
import EventEmitter from 'eventemitter3';
@@ -45,8 +45,6 @@ const RETRY_DELAY = 2_500;
const DEFAULT_TIMEOUT_MS = 60 * 1000;
const TIMEOUT_INTERVAL = 5_000;
const MEGABYTE = 1024 * 1024;
const l = logger('api-ws');
function eraseRecord<T> (record: Record<string, T>, cb?: (item: T) => void): void {
@@ -59,6 +57,10 @@ function eraseRecord<T> (record: Record<string, T>, cb?: (item: T) => void): voi
});
}
function defaultEndpointStats (): EndpointStats {
return { bytesRecv: 0, bytesSent: 0, cached: 0, errors: 0, requests: 0, subscriptions: 0, timeout: 0 };
}
/**
* # @polkadot/rpc-provider/ws
*
@@ -92,6 +94,7 @@ export class WsProvider implements ProviderInterface {
#autoConnectMs: number;
#endpointIndex: number;
#endpointStats: EndpointStats;
#isConnected = false;
#subscriptions: Record<string, WsStateSubscription> = {};
#timeoutId?: ReturnType<typeof setInterval> | null = null;
@@ -128,8 +131,9 @@ export class WsProvider implements ProviderInterface {
this.#websocket = null;
this.#stats = {
active: { requests: 0, subscriptions: 0 },
total: { bytesRecv: 0, bytesSent: 0, cached: 0, errors: 0, requests: 0, subscriptions: 0, timeout: 0 }
total: defaultEndpointStats()
};
this.#endpointStats = defaultEndpointStats();
this.#timeout = timeout || DEFAULT_TIMEOUT_MS;
if (autoConnectMs > 0) {
@@ -174,6 +178,10 @@ export class WsProvider implements ProviderInterface {
return this.#isReadyPromise;
}
public get endpoint (): string {
return this.#endpoints[this.#endpointIndex];
}
/**
* @description Returns a clone of the object
*/
@@ -181,6 +189,10 @@ export class WsProvider implements ProviderInterface {
return new WsProvider(this.#endpoints);
}
protected selectEndpointIndex (endpoints: string[]): number {
return (this.#endpointIndex + 1) % endpoints.length;
}
/**
* @summary Manually connect
* @description The [[WsProvider]] connects automatically by default, however if you decided otherwise, you may
@@ -193,22 +205,15 @@ export class WsProvider implements ProviderInterface {
}
try {
this.#endpointIndex = (this.#endpointIndex + 1) % this.#endpoints.length;
this.#endpointIndex = this.selectEndpointIndex(this.#endpoints);
// the as typeof WebSocket here is Deno-specific - not available on the globalThis
this.#websocket = typeof xglobal.WebSocket !== 'undefined' && isChildClass(xglobal.WebSocket as typeof WebSocket, WebSocket)
? new WebSocket(this.#endpoints[this.#endpointIndex])
? new WebSocket(this.endpoint)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - WS may be an instance of w3cwebsocket, which supports headers
: new WebSocket(this.#endpoints[this.#endpointIndex], undefined, undefined, this.#headers, undefined, {
// default: true
fragmentOutgoingMessages: true,
// default: 16K (bump, the Node has issues with too many fragments, e.g. on setCode)
fragmentationThreshold: 1 * MEGABYTE,
// default: 1MiB (also align with maxReceivedMessageSize)
maxReceivedFrameSize: 24 * MEGABYTE,
// default: 8MB (however Polkadot api.query.staking.erasStakers.entries(356) is over that, 16M is ok there)
maxReceivedMessageSize: 24 * MEGABYTE
// @ts-ignore - WS may be an instance of ws, which supports options
: new WebSocket(this.endpoint, undefined, {
headers: this.#headers
});
if (this.#websocket) {
@@ -281,6 +286,10 @@ export class WsProvider implements ProviderInterface {
};
}
public get endpointStats (): EndpointStats {
return this.#endpointStats;
}
/**
* @summary Listens on events after having subscribed using the [[subscribe]] function.
* @param {ProviderInterfaceEmitted} type Event
@@ -302,6 +311,7 @@ export class WsProvider implements ProviderInterface {
* @param subscription Subscription details (internally used)
*/
public send <T = any> (method: string, params: unknown[], isCacheable?: boolean, subscription?: SubscriptionHandler): Promise<T> {
this.#endpointStats.requests++;
this.#stats.total.requests++;
const [id, body] = this.#coder.encodeJson(method, params);
@@ -316,6 +326,7 @@ export class WsProvider implements ProviderInterface {
this.#callCache.set(body, resultPromise);
}
} else {
this.#endpointStats.cached++;
this.#stats.total.cached++;
}
@@ -344,9 +355,11 @@ export class WsProvider implements ProviderInterface {
start: Date.now(),
subscription
};
this.#endpointStats.bytesSent += body.length;
this.#stats.total.bytesSent += body.length;
this.#websocket.send(body);
} catch (error) {
this.#endpointStats.errors++;
this.#stats.total.errors++;
reject(error);
@@ -373,6 +386,7 @@ export class WsProvider implements ProviderInterface {
* ```
*/
public subscribe (type: string, method: string, params: unknown[], callback: ProviderInterfaceCallback): Promise<number | string> {
this.#endpointStats.subscriptions++;
this.#stats.total.subscriptions++;
// subscriptions are not cached, LRU applies to .at(<blockHash>) only
@@ -411,7 +425,7 @@ export class WsProvider implements ProviderInterface {
};
#onSocketClose = (event: CloseEvent): void => {
const error = new Error(`disconnected from ${this.#endpoints[this.#endpointIndex]}: ${event.code}:: ${event.reason || getWSErrorString(event.code)}`);
const error = new Error(`disconnected from ${this.endpoint}: ${event.code}:: ${event.reason || getWSErrorString(event.code)}`);
if (this.#autoConnectMs > 0) {
l.error(error.message);
@@ -432,8 +446,6 @@ export class WsProvider implements ProviderInterface {
this.#timeoutId = null;
}
this.#emit('disconnected');
// reject all hanging requests
eraseRecord(this.#handlers, (h) => {
try {
@@ -445,6 +457,11 @@ export class WsProvider implements ProviderInterface {
});
eraseRecord(this.#waitingForId);
// Reset stats for active endpoint
this.#endpointStats = defaultEndpointStats();
this.#emit('disconnected');
if (this.#autoConnectMs > 0) {
setTimeout((): void => {
this.connectWithRetry().catch(() => {
@@ -462,6 +479,7 @@ export class WsProvider implements ProviderInterface {
#onSocketMessage = (message: MessageEvent<string>): void => {
l.debug(() => ['received', message.data]);
this.#endpointStats.bytesRecv += message.data.length;
this.#stats.total.bytesRecv += message.data.length;
const response = JSON.parse(message.data) as JsonRpcResponse;
@@ -502,6 +520,7 @@ export class WsProvider implements ProviderInterface {
}
}
} catch (error) {
this.#endpointStats.errors++;
this.#stats.total.errors++;
handler.callback(error as Error, undefined);
@@ -532,6 +551,7 @@ export class WsProvider implements ProviderInterface {
handler.callback(null, result);
} catch (error) {
this.#endpointStats.errors++;
this.#stats.total.errors++;
handler.callback(error as Error, undefined);
@@ -543,13 +563,14 @@ export class WsProvider implements ProviderInterface {
throw new Error('WebSocket cannot be null in onOpen');
}
l.debug(() => ['connected to', this.#endpoints[this.#endpointIndex]]);
l.debug(() => ['connected to', this.endpoint]);
this.#isConnected = true;
this.#emit('connected');
this.#resubscribe();
this.#emit('connected');
return true;
};
@@ -590,6 +611,7 @@ export class WsProvider implements ProviderInterface {
// ignore
}
this.#endpointStats.timeout++;
this.#stats.total.timeout++;
delete this.#handlers[ids[i]];
}
+4 -2
View File
@@ -1,7 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Constructor } from '@polkadot/types/types';
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import type { Request } from '../mock/mockWs';
import { mockWs } from '../mock/mockWs';
@@ -26,7 +28,7 @@ function createWs (autoConnect = 1000): Promise<WsProvider> {
}
describe('send', (): void => {
let globalWs: Constructor<WebSocket>;
let globalWs: typeof WebSocket;
beforeEach((): void => {
globalWs = global.WebSocket;
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import { WsProvider } from './';
describe('state', (): void => {
@@ -1,7 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Constructor } from '@polkadot/types/types';
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import type { Request } from '../mock/mockWs';
import type { Global, Mock } from './../mock/types';
@@ -26,7 +28,7 @@ function createWs (autoConnect = 1000): Promise<WsProvider> {
}
describe('subscribe', (): void => {
let globalWs: Constructor<WebSocket>;
let globalWs: typeof WebSocket;
beforeEach((): void => {
globalWs = global.WebSocket;
@@ -1,7 +1,9 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Constructor } from '@polkadot/types/types';
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import type { Request } from '../mock/mockWs';
import type { Global, Mock } from './../mock/types';
@@ -26,7 +28,7 @@ function createWs (autoConnect = 1000): Promise<WsProvider> {
}
describe('subscribe', (): void => {
let globalWs: Constructor<WebSocket>;
let globalWs: typeof WebSocket;
beforeEach((): void => {
globalWs = global.WebSocket;
@@ -45,7 +47,7 @@ describe('subscribe', (): void => {
}
});
it('removes subscriptions', (): Promise<boolean> => {
it('removes subscriptions', async (): Promise<void> => {
createMock([
{
id: 1,
@@ -63,7 +65,7 @@ describe('subscribe', (): void => {
}
]);
return createWs().then((ws) =>
await createWs().then((ws) =>
ws
.subscribe('test', 'subscribe_test', [], (cb): void => {
expect(cb).toEqual(expect.anything());
+20 -23
View File
@@ -20,34 +20,31 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"main": "index.js",
"bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
"polkadot-types-from-chain": "./scripts/polkadot-types-from-chain.cjs",
"polkadot-types-from-defs": "./scripts/polkadot-types-from-defs.cjs",
"polkadot-types-internal-interfaces": "./scripts/polkadot-types-internal-interfaces.cjs",
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.mjs",
"polkadot-types-from-chain": "./scripts/polkadot-types-from-chain.mjs",
"polkadot-types-from-defs": "./scripts/polkadot-types-from-defs.mjs",
"polkadot-types-internal-interfaces": "./scripts/polkadot-types-internal-interfaces.mjs",
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.mjs"
},
"dependencies": {
"@babel/core": "^7.20.12",
"@babel/register": "^7.18.9",
"@babel/runtime": "^7.20.13",
"@polkadot/api": "9.14.2",
"@polkadot/api-augment": "9.14.2",
"@polkadot/rpc-augment": "9.14.2",
"@polkadot/rpc-provider": "9.14.2",
"@polkadot/types": "9.14.2",
"@polkadot/types-augment": "9.14.2",
"@polkadot/types-codec": "9.14.2",
"@polkadot/types-create": "9.14.2",
"@polkadot/types-support": "9.14.2",
"@polkadot/util": "^10.4.2",
"@polkadot/util-crypto": "^10.4.2",
"@polkadot/x-ws": "^10.4.2",
"@polkadot/api": "10.0.1",
"@polkadot/api-augment": "10.0.1",
"@polkadot/rpc-augment": "10.0.1",
"@polkadot/rpc-provider": "10.0.1",
"@polkadot/types": "10.0.1",
"@polkadot/types-augment": "10.0.1",
"@polkadot/types-codec": "10.0.1",
"@polkadot/types-create": "10.0.1",
"@polkadot/types-support": "10.0.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"@polkadot/x-ws": "^11.0.1",
"handlebars": "^4.7.7",
"websocket": "^1.0.34",
"yargs": "^17.6.2"
"tslib": "^2.5.0",
"yargs": "^17.7.1"
},
"devDependencies": {
"@types/websocket": "^1.0.5",
-36
View File
@@ -1,36 +0,0 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = function (file) {
let main;
try {
main = require(`../cjs/${file}.js`).main;
} catch (error) {
// required for dev-only setups
process.env.JEST_WORKER_ID = '123';
// register aliases
require('@babel/register')({
extensions: ['.js', '.ts'],
plugins: [
['module-resolver', {
alias: {
'^@polkadot/api-(augment|base|derive)(.*)': './packages/api-\\1/src\\2',
// eslint-disable-next-line sort-keys
'^@polkadot/api(.*)': './packages/api/src/\\1',
'^@polkadot/rpc-(augment|core|provider)(.*)': './packages/rpc-\\1/src\\2',
'^@polkadot/types-(augment|codec|create|known|metadata|support)(.*)': './packages/types-\\1/src\\2',
// eslint-disable-next-line sort-keys
'^@polkadot/types(.*)': './packages/types/src\\1'
}
}]
]
});
// get ts source
main = require(`../src/${file}.ts`).main;
}
main();
};
@@ -2,4 +2,6 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
require('./execWithSrc.cjs')('fromChain');
import { main } from '@polkadot/typegen/extractChain';
main();
@@ -2,4 +2,6 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
require('./execWithSrc.cjs')('interfacesTs');
import { main } from '@polkadot/typegen/fromChain';
main();
@@ -2,4 +2,6 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
require('./execWithSrc.cjs')('fromDefs');
import { main } from '@polkadot/typegen/fromDefs';
main();
@@ -0,0 +1,7 @@
#!/usr/bin/env node
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { main } from '@polkadot/typegen/interfacesTs';
main();
@@ -1,5 +0,0 @@
#!/usr/bin/env node
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
require('./execWithSrc.cjs')('metadataMd');
@@ -2,4 +2,6 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
require('./execWithSrc.cjs')('extractChain');
import { main } from '@polkadot/typegen/metadataMd';
main();
+33 -16
View File
@@ -3,16 +3,17 @@
import type { HexString } from '@polkadot/util/types';
import fs from 'fs';
import path from 'path';
import yargs from 'yargs';
import { Definitions } from '@polkadot/types/types';
import { formatNumber } from '@polkadot/util';
import { Definitions, DefinitionsTypes } from '@polkadot/types/types';
import { formatNumber, isHex } from '@polkadot/util';
import { generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultQuery, generateDefaultRpc, generateDefaultRuntime, generateDefaultTx } from './generate';
import { assertDir, assertFile, getMetadataViaWs, HEADER, writeFile } from './util';
function generate (metaHex: HexString, pkg: string | undefined, output: string, isStrict?: boolean): void {
async function generate (metaHex: HexString, pkg: string | undefined, output: string, isStrict?: boolean): Promise<void> {
console.log(`Generating from metadata, ${formatNumber((metaHex.length - 2) / 2)} bytes`);
const outputPath = assertDir(path.join(process.cwd(), output));
@@ -21,9 +22,12 @@ function generate (metaHex: HexString, pkg: string | undefined, output: string,
if (pkg) {
try {
const defPath = assertFile(path.join(outputPath, 'definitions.ts'));
const defCont = await import(defPath) as { module: any };
extraTypes = {
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-argument
[pkg]: require(assertFile(path.join(outputPath, 'definitions.ts'))) as Record<string, any>
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
[pkg]: defCont.module
};
} catch (error) {
console.error('ERROR: No custom definitions found:', (error as Error).message);
@@ -31,10 +35,12 @@ function generate (metaHex: HexString, pkg: string | undefined, output: string,
}
try {
const lookPath = assertFile(path.join(outputPath, 'lookup.ts'));
const lookCont = await import(lookPath) as { module: { default: DefinitionsTypes } };
customLookupDefinitions = {
rpc: {},
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
types: require(assertFile(path.join(outputPath, 'lookup.ts'))).default
types: lookCont.module.default
};
} catch (error) {
console.error('ERROR: No lookup definitions found:', (error as Error).message);
@@ -64,7 +70,7 @@ function generate (metaHex: HexString, pkg: string | undefined, output: string,
type ArgV = { endpoint: string; output: string; package?: string; strict?: boolean };
export function main (): void {
async function mainPromise (): Promise<void> {
const { endpoint, output, package: pkg, strict: isStrict } = yargs.strict().options({
endpoint: {
description: 'The endpoint to connect to (e.g. wss://kusama-rpc.polkadot.io) or relative path to a file containing the JSON output of an RPC state_getMetadata call',
@@ -86,14 +92,25 @@ export function main (): void {
}
}).argv as ArgV;
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
getMetadataViaWs(endpoint)
.then((metadata) => generate(metadata, pkg, output, isStrict))
.catch(() => process.exit(1));
} else {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const metadata = (require(assertFile(path.join(process.cwd(), endpoint))) as Record<string, HexString>).result;
let metadata: HexString;
generate(metadata, pkg, output, isStrict);
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
metadata = await getMetadataViaWs(endpoint);
} else {
metadata = (
JSON.parse(
fs.readFileSync(assertFile(path.join(process.cwd(), endpoint)), 'utf-8')
) as { result: HexString }
).result;
if (!isHex(metadata)) {
throw new Error('Invalid metadata file');
}
}
await generate(metadata, pkg, output, isStrict);
}
export function main (): void {
mainPromise().catch(() => process.exit(1));
}
+25 -11
View File
@@ -3,10 +3,12 @@
import type { HexString } from '@polkadot/util/types';
import fs from 'fs';
import path from 'path';
import yargs from 'yargs';
import * as substrateDefs from '@polkadot/types/interfaces/definitions';
import { isHex } from '@polkadot/util';
import { generateInterfaceTypes } from './generate/interfaceRegistry';
import { generateTsDef } from './generate/tsDef';
@@ -15,7 +17,7 @@ import { assertDir, assertFile, getMetadataViaWs } from './util';
type ArgV = { input: string; package: string; endpoint?: string; };
export function main (): void {
async function mainPromise (): Promise<void> {
const { endpoint, input, package: pkg } = yargs.strict().options({
endpoint: {
description: 'The endpoint to connect to (e.g. wss://kusama-rpc.polkadot.io) or relative path to a file containing the JSON output of an RPC state_getMetadata call',
@@ -37,8 +39,9 @@ export function main (): void {
let userDefs: Record<string, any> = {};
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
userDefs = require(assertFile(path.join(inputPath, 'definitions.ts'))) as Record<string, any>;
userDefs = await import(
assertFile(path.join(inputPath, 'definitions.ts'))
) as Record<string, any>;
} catch (error) {
console.error('ERROR: Unable to load user definitions:', (error as Error).message);
}
@@ -70,15 +73,26 @@ export function main (): void {
generateInterfaceTypes(allDefs, path.join(inputPath, 'augment-types.ts'));
if (endpoint) {
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
getMetadataViaWs(endpoint)
.then((metadata) => generateDefaultLookup(inputPath, metadata))
.catch(() => process.exit(1));
} else {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const metaHex = (require(assertFile(path.join(process.cwd(), endpoint))) as Record<string, HexString>).result;
let metadata: HexString;
generateDefaultLookup(inputPath, metaHex);
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
metadata = await getMetadataViaWs(endpoint);
} else {
metadata = (
JSON.parse(
fs.readFileSync(assertFile(path.join(process.cwd(), endpoint)), 'utf-8')
) as { result: HexString }
).result;
if (!isHex(metadata)) {
throw new Error('Invalid metadata file');
}
}
generateDefaultLookup(inputPath, metadata);
}
}
export function main (): void {
mainPromise().catch(() => process.exit(1));
}
+1 -1
View File
@@ -5,7 +5,7 @@ import type { MetadataLatest, SiLookupTypeId } from '@polkadot/types/interfaces'
import type { PortableRegistry } from '@polkadot/types/metadata';
import type { Codec, DefinitionRpcParam } from '@polkadot/types/types';
import fs from 'fs';
import fs from 'node:fs';
import { Metadata, TypeRegistry, Vec } from '@polkadot/types';
import * as definitions from '@polkadot/types/interfaces/definitions';
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '9.14.2' };
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '10.0.1' };
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
import fs from 'fs';
import fs from 'node:fs';
import { assert } from '@polkadot/util';
+4 -6
View File
@@ -1,13 +1,15 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// 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 { getSimilarTypes } from './derived';
describe('getSimilarTypes', (): void => {
let registry: TypeRegistry;
const registry = new TypeRegistry();
const mockImports = {
codecTypes: {},
definitions: {},
@@ -22,10 +24,6 @@ describe('getSimilarTypes', (): void => {
typesTypes: {}
};
beforeAll((): void => {
registry = new TypeRegistry();
});
it('handles nested Tuples', (): void => {
expect(getSimilarTypes(registry, {}, '(AccountId, (Balance, u32), u64)', mockImports)).toEqual([
'ITuple<[AccountId, ITuple<[Balance, u32]>, u64]>',
+3 -3
View File
@@ -1,9 +1,9 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
import fs from 'fs';
import path from 'path';
import process from 'process';
import fs from 'node:fs';
import path from 'node:path';
import process from 'node:process';
import { packageInfo } from '../packageInfo';
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors
// 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 { formatType } from './formatting';
+5 -5
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.14.2",
"version": "10.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/types": "9.14.2",
"@polkadot/types-codec": "9.14.2",
"@polkadot/util": "^10.4.2"
"@polkadot/types": "10.0.1",
"@polkadot/types-codec": "10.0.1",
"@polkadot/util": "^11.0.1",
"tslib": "^2.5.0"
}
}
+1 -1
View File
@@ -164,7 +164,7 @@ export default {
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
},
/**
* Lookup876: kusama_runtime::Runtime
* Lookup880: kusama_runtime::Runtime
**/
KusamaRuntimeRuntime: 'Null'
};
+94 -94
View File
@@ -1111,7 +1111,7 @@ export default {
votes16: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);15],Compact<u16>)>'
},
/**
* Lookup394: polkadot_runtime_parachains::configuration::pallet::Call<T>
* Lookup395: polkadot_runtime_parachains::configuration::pallet::Call<T>
**/
PolkadotRuntimeParachainsConfigurationPalletCall: {
_enum: {
@@ -1383,15 +1383,15 @@ export default {
}
},
/**
* Lookup395: polkadot_runtime_parachains::shared::pallet::Call<T>
* Lookup396: polkadot_runtime_parachains::shared::pallet::Call<T>
**/
PolkadotRuntimeParachainsSharedPalletCall: 'Null',
/**
* Lookup396: polkadot_runtime_parachains::inclusion::pallet::Call<T>
* Lookup397: polkadot_runtime_parachains::inclusion::pallet::Call<T>
**/
PolkadotRuntimeParachainsInclusionPalletCall: 'Null',
/**
* Lookup397: polkadot_runtime_parachains::paras_inherent::pallet::Call<T>
* Lookup398: polkadot_runtime_parachains::paras_inherent::pallet::Call<T>
**/
PolkadotRuntimeParachainsParasInherentPalletCall: {
_enum: {
@@ -1401,7 +1401,7 @@ export default {
}
},
/**
* Lookup398: polkadot_primitives::v2::InherentData<sp_runtime::generic::header::Header<Number, sp_runtime::traits::BlakeTwo256>>
* Lookup399: polkadot_primitives::v2::InherentData<sp_runtime::generic::header::Header<Number, sp_runtime::traits::BlakeTwo256>>
**/
PolkadotPrimitivesV2InherentData: {
bitfields: 'Vec<PolkadotPrimitivesV2SignedUncheckedSigned>',
@@ -1410,7 +1410,7 @@ export default {
parentHeader: 'SpRuntimeHeader'
},
/**
* Lookup400: polkadot_primitives::v2::signed::UncheckedSigned<polkadot_primitives::v2::AvailabilityBitfield, polkadot_primitives::v2::AvailabilityBitfield>
* Lookup401: polkadot_primitives::v2::signed::UncheckedSigned<polkadot_primitives::v2::AvailabilityBitfield, polkadot_primitives::v2::AvailabilityBitfield>
**/
PolkadotPrimitivesV2SignedUncheckedSigned: {
payload: 'BitVec',
@@ -1418,15 +1418,15 @@ export default {
signature: 'PolkadotPrimitivesV2ValidatorAppSignature'
},
/**
* Lookup403: bitvec::order::Lsb0
* Lookup404: bitvec::order::Lsb0
**/
BitvecOrderLsb0: 'Null',
/**
* Lookup405: polkadot_primitives::v2::validator_app::Signature
* Lookup406: polkadot_primitives::v2::validator_app::Signature
**/
PolkadotPrimitivesV2ValidatorAppSignature: 'SpCoreSr25519Signature',
/**
* Lookup407: polkadot_primitives::v2::BackedCandidate<primitive_types::H256>
* Lookup408: polkadot_primitives::v2::BackedCandidate<primitive_types::H256>
**/
PolkadotPrimitivesV2BackedCandidate: {
candidate: 'PolkadotPrimitivesV2CommittedCandidateReceipt',
@@ -1434,14 +1434,14 @@ export default {
validatorIndices: 'BitVec'
},
/**
* Lookup408: polkadot_primitives::v2::CommittedCandidateReceipt<primitive_types::H256>
* Lookup409: polkadot_primitives::v2::CommittedCandidateReceipt<primitive_types::H256>
**/
PolkadotPrimitivesV2CommittedCandidateReceipt: {
descriptor: 'PolkadotPrimitivesV2CandidateDescriptor',
commitments: 'PolkadotPrimitivesV2CandidateCommitments'
},
/**
* Lookup409: polkadot_primitives::v2::CandidateCommitments<N>
* Lookup410: polkadot_primitives::v2::CandidateCommitments<N>
**/
PolkadotPrimitivesV2CandidateCommitments: {
upwardMessages: 'Vec<Bytes>',
@@ -1452,14 +1452,14 @@ export default {
hrmpWatermark: 'u32'
},
/**
* Lookup412: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
* Lookup413: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
**/
PolkadotCorePrimitivesOutboundHrmpMessage: {
recipient: 'u32',
data: 'Bytes'
},
/**
* Lookup417: polkadot_primitives::v2::ValidityAttestation
* Lookup418: polkadot_primitives::v2::ValidityAttestation
**/
PolkadotPrimitivesV2ValidityAttestation: {
_enum: {
@@ -1469,7 +1469,7 @@ export default {
}
},
/**
* Lookup419: polkadot_primitives::v2::DisputeStatementSet
* Lookup420: polkadot_primitives::v2::DisputeStatementSet
**/
PolkadotPrimitivesV2DisputeStatementSet: {
candidateHash: 'H256',
@@ -1477,7 +1477,7 @@ export default {
statements: 'Vec<(PolkadotPrimitivesV2DisputeStatement,u32,PolkadotPrimitivesV2ValidatorAppSignature)>'
},
/**
* Lookup422: polkadot_primitives::v2::DisputeStatement
* Lookup423: polkadot_primitives::v2::DisputeStatement
**/
PolkadotPrimitivesV2DisputeStatement: {
_enum: {
@@ -1486,7 +1486,7 @@ export default {
}
},
/**
* Lookup423: polkadot_primitives::v2::ValidDisputeStatementKind
* Lookup424: polkadot_primitives::v2::ValidDisputeStatementKind
**/
PolkadotPrimitivesV2ValidDisputeStatementKind: {
_enum: {
@@ -1497,13 +1497,13 @@ export default {
}
},
/**
* Lookup424: polkadot_primitives::v2::InvalidDisputeStatementKind
* Lookup425: polkadot_primitives::v2::InvalidDisputeStatementKind
**/
PolkadotPrimitivesV2InvalidDisputeStatementKind: {
_enum: ['Explicit']
},
/**
* Lookup425: polkadot_runtime_parachains::paras::pallet::Call<T>
* Lookup426: polkadot_runtime_parachains::paras::pallet::Call<T>
**/
PolkadotRuntimeParachainsParasPalletCall: {
_enum: {
@@ -1540,7 +1540,7 @@ export default {
}
},
/**
* Lookup426: polkadot_primitives::v2::PvfCheckStatement
* Lookup427: polkadot_primitives::v2::PvfCheckStatement
**/
PolkadotPrimitivesV2PvfCheckStatement: {
accept: 'bool',
@@ -1549,7 +1549,7 @@ export default {
validatorIndex: 'u32'
},
/**
* Lookup427: polkadot_runtime_parachains::initializer::pallet::Call<T>
* Lookup428: polkadot_runtime_parachains::initializer::pallet::Call<T>
**/
PolkadotRuntimeParachainsInitializerPalletCall: {
_enum: {
@@ -1559,11 +1559,11 @@ export default {
}
},
/**
* Lookup428: polkadot_runtime_parachains::dmp::pallet::Call<T>
* Lookup429: polkadot_runtime_parachains::dmp::pallet::Call<T>
**/
PolkadotRuntimeParachainsDmpPalletCall: 'Null',
/**
* Lookup429: polkadot_runtime_parachains::ump::pallet::Call<T>
* Lookup430: polkadot_runtime_parachains::ump::pallet::Call<T>
**/
PolkadotRuntimeParachainsUmpPalletCall: {
_enum: {
@@ -1574,7 +1574,7 @@ export default {
}
},
/**
* Lookup430: polkadot_runtime_parachains::hrmp::pallet::Call<T>
* Lookup431: polkadot_runtime_parachains::hrmp::pallet::Call<T>
**/
PolkadotRuntimeParachainsHrmpPalletCall: {
_enum: {
@@ -1613,13 +1613,13 @@ export default {
}
},
/**
* Lookup431: polkadot_runtime_parachains::disputes::pallet::Call<T>
* Lookup432: polkadot_runtime_parachains::disputes::pallet::Call<T>
**/
PolkadotRuntimeParachainsDisputesPalletCall: {
_enum: ['force_unfreeze']
},
/**
* Lookup432: polkadot_runtime_common::paras_registrar::pallet::Call<T>
* Lookup433: polkadot_runtime_common::paras_registrar::pallet::Call<T>
**/
PolkadotRuntimeCommonParasRegistrarPalletCall: {
_enum: {
@@ -1660,7 +1660,7 @@ export default {
}
},
/**
* Lookup433: polkadot_runtime_common::slots::pallet::Call<T>
* Lookup434: polkadot_runtime_common::slots::pallet::Call<T>
**/
PolkadotRuntimeCommonSlotsPalletCall: {
_enum: {
@@ -1680,7 +1680,7 @@ export default {
}
},
/**
* Lookup434: polkadot_runtime_common::auctions::pallet::Call<T>
* Lookup435: polkadot_runtime_common::auctions::pallet::Call<T>
**/
PolkadotRuntimeCommonAuctionsPalletCall: {
_enum: {
@@ -1699,7 +1699,7 @@ export default {
}
},
/**
* Lookup436: polkadot_runtime_common::crowdloan::pallet::Call<T>
* Lookup437: polkadot_runtime_common::crowdloan::pallet::Call<T>
**/
PolkadotRuntimeCommonCrowdloanPalletCall: {
_enum: {
@@ -1748,7 +1748,7 @@ export default {
}
},
/**
* Lookup438: sp_runtime::MultiSigner
* Lookup439: sp_runtime::MultiSigner
**/
SpRuntimeMultiSigner: {
_enum: {
@@ -1758,11 +1758,11 @@ export default {
}
},
/**
* Lookup439: sp_core::ecdsa::Public
* Lookup440: sp_core::ecdsa::Public
**/
SpCoreEcdsaPublic: '[u8;33]',
/**
* Lookup444: pallet_xcm::pallet::Call<T>
* Lookup445: pallet_xcm::pallet::Call<T>
**/
PalletXcmCall: {
_enum: {
@@ -1816,7 +1816,7 @@ export default {
}
},
/**
* Lookup445: xcm::VersionedXcm<RuntimeCall>
* Lookup446: xcm::VersionedXcm<RuntimeCall>
**/
XcmVersionedXcm: {
_enum: {
@@ -1827,11 +1827,11 @@ export default {
}
},
/**
* Lookup446: xcm::v2::Xcm<RuntimeCall>
* Lookup447: xcm::v2::Xcm<RuntimeCall>
**/
XcmV2Xcm: 'Vec<XcmV2Instruction>',
/**
* Lookup448: xcm::v2::Instruction<RuntimeCall>
* Lookup449: xcm::v2::Instruction<RuntimeCall>
**/
XcmV2Instruction: {
_enum: {
@@ -1929,7 +1929,7 @@ export default {
}
},
/**
* Lookup449: xcm::v2::Response
* Lookup450: xcm::v2::Response
**/
XcmV2Response: {
_enum: {
@@ -1940,7 +1940,7 @@ export default {
}
},
/**
* Lookup452: xcm::v2::traits::Error
* Lookup453: xcm::v2::traits::Error
**/
XcmV2TraitsError: {
_enum: {
@@ -1973,7 +1973,7 @@ export default {
}
},
/**
* Lookup453: xcm::v2::multiasset::MultiAssetFilter
* Lookup454: xcm::v2::multiasset::MultiAssetFilter
**/
XcmV2MultiassetMultiAssetFilter: {
_enum: {
@@ -1982,7 +1982,7 @@ export default {
}
},
/**
* Lookup454: xcm::v2::multiasset::WildMultiAsset
* Lookup455: xcm::v2::multiasset::WildMultiAsset
**/
XcmV2MultiassetWildMultiAsset: {
_enum: {
@@ -1994,13 +1994,13 @@ export default {
}
},
/**
* Lookup455: xcm::v2::multiasset::WildFungibility
* Lookup456: xcm::v2::multiasset::WildFungibility
**/
XcmV2MultiassetWildFungibility: {
_enum: ['Fungible', 'NonFungible']
},
/**
* Lookup456: xcm::v2::WeightLimit
* Lookup457: xcm::v2::WeightLimit
**/
XcmV2WeightLimit: {
_enum: {
@@ -2009,13 +2009,13 @@ export default {
}
},
/**
* Lookup572: polkadot_runtime_common::claims::pallet::Error<T>
* Lookup576: polkadot_runtime_common::claims::pallet::Error<T>
**/
PolkadotRuntimeCommonClaimsPalletError: {
_enum: ['InvalidEthereumSignature', 'SignerHasNoClaim', 'SenderHasNoClaim', 'PotUnderflow', 'InvalidStatement', 'VestedBalanceExists']
},
/**
* Lookup647: polkadot_runtime_parachains::configuration::HostConfiguration<BlockNumber>
* Lookup651: polkadot_runtime_parachains::configuration::HostConfiguration<BlockNumber>
**/
PolkadotRuntimeParachainsConfigurationHostConfiguration: {
maxCodeSize: 'u32',
@@ -2062,20 +2062,20 @@ export default {
minimumValidationUpgradeDelay: 'u32'
},
/**
* Lookup650: polkadot_runtime_parachains::configuration::pallet::Error<T>
* Lookup654: polkadot_runtime_parachains::configuration::pallet::Error<T>
**/
PolkadotRuntimeParachainsConfigurationPalletError: {
_enum: ['InvalidNewValue']
},
/**
* Lookup653: polkadot_runtime_parachains::inclusion::AvailabilityBitfieldRecord<N>
* Lookup657: polkadot_runtime_parachains::inclusion::AvailabilityBitfieldRecord<N>
**/
PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord: {
bitfield: 'BitVec',
submittedAt: 'u32'
},
/**
* Lookup654: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability<primitive_types::H256, N>
* Lookup658: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability<primitive_types::H256, N>
**/
PolkadotRuntimeParachainsInclusionCandidatePendingAvailability: {
_alias: {
@@ -2091,13 +2091,13 @@ export default {
backingGroup: 'u32'
},
/**
* Lookup655: polkadot_runtime_parachains::inclusion::pallet::Error<T>
* Lookup659: polkadot_runtime_parachains::inclusion::pallet::Error<T>
**/
PolkadotRuntimeParachainsInclusionPalletError: {
_enum: ['UnsortedOrDuplicateValidatorIndices', 'UnsortedOrDuplicateDisputeStatementSet', 'UnsortedOrDuplicateBackedCandidates', 'UnexpectedRelayParent', 'WrongBitfieldSize', 'BitfieldAllZeros', 'BitfieldDuplicateOrUnordered', 'ValidatorIndexOutOfBounds', 'InvalidBitfieldSignature', 'UnscheduledCandidate', 'CandidateScheduledBeforeParaFree', 'WrongCollator', 'ScheduledOutOfOrder', 'HeadDataTooLarge', 'PrematureCodeUpgrade', 'NewCodeTooLarge', 'CandidateNotInParentContext', 'InvalidGroupIndex', 'InsufficientBacking', 'InvalidBacking', 'NotCollatorSigned', 'ValidationDataHashMismatch', 'IncorrectDownwardMessageHandling', 'InvalidUpwardMessages', 'HrmpWatermarkMishandling', 'InvalidOutboundHrmp', 'InvalidValidationCodeHash', 'ParaHeadMismatch', 'BitfieldReferencesFreedCore']
},
/**
* Lookup656: polkadot_primitives::v2::ScrapedOnChainVotes<primitive_types::H256>
* Lookup660: polkadot_primitives::v2::ScrapedOnChainVotes<primitive_types::H256>
**/
PolkadotPrimitivesV2ScrapedOnChainVotes: {
session: 'u32',
@@ -2105,38 +2105,38 @@ export default {
disputes: 'Vec<PolkadotPrimitivesV2DisputeStatementSet>'
},
/**
* Lookup661: polkadot_runtime_parachains::paras_inherent::pallet::Error<T>
* Lookup665: polkadot_runtime_parachains::paras_inherent::pallet::Error<T>
**/
PolkadotRuntimeParachainsParasInherentPalletError: {
_enum: ['TooManyInclusionInherents', 'InvalidParentHeader', 'CandidateConcludedInvalid', 'InherentOverweight', 'DisputeStatementsUnsortedOrDuplicates', 'DisputeInvalid']
},
/**
* Lookup663: polkadot_runtime_parachains::scheduler::ParathreadClaimQueue
* Lookup667: polkadot_runtime_parachains::scheduler::ParathreadClaimQueue
**/
PolkadotRuntimeParachainsSchedulerParathreadClaimQueue: {
queue: 'Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>',
nextCoreOffset: 'u32'
},
/**
* Lookup665: polkadot_runtime_parachains::scheduler::QueuedParathread
* Lookup669: polkadot_runtime_parachains::scheduler::QueuedParathread
**/
PolkadotRuntimeParachainsSchedulerQueuedParathread: {
claim: 'PolkadotPrimitivesV2ParathreadEntry',
coreOffset: 'u32'
},
/**
* Lookup666: polkadot_primitives::v2::ParathreadEntry
* Lookup670: polkadot_primitives::v2::ParathreadEntry
**/
PolkadotPrimitivesV2ParathreadEntry: {
claim: 'PolkadotPrimitivesV2ParathreadClaim',
retries: 'u32'
},
/**
* Lookup667: polkadot_primitives::v2::ParathreadClaim
* Lookup671: polkadot_primitives::v2::ParathreadClaim
**/
PolkadotPrimitivesV2ParathreadClaim: '(u32,PolkadotPrimitivesV2CollatorAppPublic)',
/**
* Lookup670: polkadot_primitives::v2::CoreOccupied
* Lookup674: polkadot_primitives::v2::CoreOccupied
**/
PolkadotPrimitivesV2CoreOccupied: {
_enum: {
@@ -2145,7 +2145,7 @@ export default {
}
},
/**
* Lookup673: polkadot_runtime_parachains::scheduler::CoreAssignment
* Lookup677: polkadot_runtime_parachains::scheduler::CoreAssignment
**/
PolkadotRuntimeParachainsSchedulerCoreAssignment: {
core: 'u32',
@@ -2154,7 +2154,7 @@ export default {
groupIdx: 'u32'
},
/**
* Lookup674: polkadot_runtime_parachains::scheduler::AssignmentKind
* Lookup678: polkadot_runtime_parachains::scheduler::AssignmentKind
**/
PolkadotRuntimeParachainsSchedulerAssignmentKind: {
_enum: {
@@ -2163,7 +2163,7 @@ export default {
}
},
/**
* Lookup675: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState<BlockNumber>
* Lookup679: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState<BlockNumber>
**/
PolkadotRuntimeParachainsParasPvfCheckActiveVoteState: {
votesAccept: 'BitVec',
@@ -2173,7 +2173,7 @@ export default {
causes: 'Vec<PolkadotRuntimeParachainsParasPvfCheckCause>'
},
/**
* Lookup677: polkadot_runtime_parachains::paras::PvfCheckCause<BlockNumber>
* Lookup681: polkadot_runtime_parachains::paras::PvfCheckCause<BlockNumber>
**/
PolkadotRuntimeParachainsParasPvfCheckCause: {
_enum: {
@@ -2185,39 +2185,39 @@ export default {
}
},
/**
* Lookup679: polkadot_runtime_parachains::paras::ParaLifecycle
* Lookup683: polkadot_runtime_parachains::paras::ParaLifecycle
**/
PolkadotRuntimeParachainsParasParaLifecycle: {
_enum: ['Onboarding', 'Parathread', 'Parachain', 'UpgradingParathread', 'DowngradingParachain', 'OffboardingParathread', 'OffboardingParachain']
},
/**
* Lookup681: polkadot_runtime_parachains::paras::ParaPastCodeMeta<N>
* Lookup685: polkadot_runtime_parachains::paras::ParaPastCodeMeta<N>
**/
PolkadotRuntimeParachainsParasParaPastCodeMeta: {
upgradeTimes: 'Vec<PolkadotRuntimeParachainsParasReplacementTimes>',
lastPruned: 'Option<u32>'
},
/**
* Lookup683: polkadot_runtime_parachains::paras::ReplacementTimes<N>
* Lookup687: polkadot_runtime_parachains::paras::ReplacementTimes<N>
**/
PolkadotRuntimeParachainsParasReplacementTimes: {
expectedAt: 'u32',
activatedAt: 'u32'
},
/**
* Lookup685: polkadot_primitives::v2::UpgradeGoAhead
* Lookup689: polkadot_primitives::v2::UpgradeGoAhead
**/
PolkadotPrimitivesV2UpgradeGoAhead: {
_enum: ['Abort', 'GoAhead']
},
/**
* Lookup686: polkadot_primitives::v2::UpgradeRestriction
* Lookup690: polkadot_primitives::v2::UpgradeRestriction
**/
PolkadotPrimitivesV2UpgradeRestriction: {
_enum: ['Present']
},
/**
* Lookup687: polkadot_runtime_parachains::paras::ParaGenesisArgs
* Lookup691: polkadot_runtime_parachains::paras::ParaGenesisArgs
**/
PolkadotRuntimeParachainsParasParaGenesisArgs: {
genesisHead: 'Bytes',
@@ -2225,13 +2225,13 @@ export default {
paraKind: 'bool'
},
/**
* Lookup688: polkadot_runtime_parachains::paras::pallet::Error<T>
* Lookup692: polkadot_runtime_parachains::paras::pallet::Error<T>
**/
PolkadotRuntimeParachainsParasPalletError: {
_enum: ['NotRegistered', 'CannotOnboard', 'CannotOffboard', 'CannotUpgrade', 'CannotDowngrade', 'PvfCheckStatementStale', 'PvfCheckStatementFuture', 'PvfCheckValidatorIndexOutOfBounds', 'PvfCheckInvalidSignature', 'PvfCheckDoubleVote', 'PvfCheckSubjectInvalid', 'PvfCheckDisabled', 'CannotUpgradeCode']
},
/**
* Lookup690: polkadot_runtime_parachains::initializer::BufferedSessionChange
* Lookup694: polkadot_runtime_parachains::initializer::BufferedSessionChange
**/
PolkadotRuntimeParachainsInitializerBufferedSessionChange: {
validators: 'Vec<PolkadotPrimitivesV2ValidatorAppPublic>',
@@ -2239,20 +2239,20 @@ export default {
sessionIndex: 'u32'
},
/**
* Lookup692: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
* Lookup696: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
**/
PolkadotCorePrimitivesInboundDownwardMessage: {
sentAt: 'u32',
msg: 'Bytes'
},
/**
* Lookup694: polkadot_runtime_parachains::ump::pallet::Error<T>
* Lookup698: polkadot_runtime_parachains::ump::pallet::Error<T>
**/
PolkadotRuntimeParachainsUmpPalletError: {
_enum: ['UnknownMessageIndex', 'WeightOverLimit']
},
/**
* Lookup695: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest
* Lookup699: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest
**/
PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest: {
confirmed: 'bool',
@@ -2263,7 +2263,7 @@ export default {
maxTotalSize: 'u32'
},
/**
* Lookup697: polkadot_runtime_parachains::hrmp::HrmpChannel
* Lookup701: polkadot_runtime_parachains::hrmp::HrmpChannel
**/
PolkadotRuntimeParachainsHrmpHrmpChannel: {
maxCapacity: 'u32',
@@ -2276,20 +2276,20 @@ export default {
recipientDeposit: 'u128'
},
/**
* Lookup699: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
* Lookup703: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
**/
PolkadotCorePrimitivesInboundHrmpMessage: {
sentAt: 'u32',
data: 'Bytes'
},
/**
* Lookup702: polkadot_runtime_parachains::hrmp::pallet::Error<T>
* Lookup706: polkadot_runtime_parachains::hrmp::pallet::Error<T>
**/
PolkadotRuntimeParachainsHrmpPalletError: {
_enum: ['OpenHrmpChannelToSelf', 'OpenHrmpChannelInvalidRecipient', 'OpenHrmpChannelZeroCapacity', 'OpenHrmpChannelCapacityExceedsLimit', 'OpenHrmpChannelZeroMessageSize', 'OpenHrmpChannelMessageSizeExceedsLimit', 'OpenHrmpChannelAlreadyExists', 'OpenHrmpChannelAlreadyRequested', 'OpenHrmpChannelLimitExceeded', 'AcceptHrmpChannelDoesntExist', 'AcceptHrmpChannelAlreadyConfirmed', 'AcceptHrmpChannelLimitExceeded', 'CloseHrmpChannelUnauthorized', 'CloseHrmpChannelDoesntExist', 'CloseHrmpChannelAlreadyUnderway', 'CancelHrmpOpenChannelUnauthorized', 'OpenHrmpChannelDoesntExist', 'OpenHrmpChannelAlreadyConfirmed', 'WrongWitness']
},
/**
* Lookup704: polkadot_primitives::v2::SessionInfo
* Lookup708: polkadot_primitives::v2::SessionInfo
**/
PolkadotPrimitivesV2SessionInfo: {
activeValidatorIndices: 'Vec<u32>',
@@ -2307,19 +2307,19 @@ export default {
neededApprovals: 'u32'
},
/**
* Lookup705: polkadot_primitives::v2::IndexedVec<polkadot_primitives::v2::ValidatorIndex, polkadot_primitives::v2::validator_app::Public>
* Lookup709: polkadot_primitives::v2::IndexedVec<polkadot_primitives::v2::ValidatorIndex, polkadot_primitives::v2::validator_app::Public>
**/
PolkadotPrimitivesV2IndexedVecValidatorIndex: 'Vec<PolkadotPrimitivesV2ValidatorAppPublic>',
/**
* Lookup707: polkadot_primitives::v2::IndexedVec<polkadot_primitives::v2::GroupIndex, V>
* Lookup711: polkadot_primitives::v2::IndexedVec<polkadot_primitives::v2::GroupIndex, V>
**/
PolkadotPrimitivesV2IndexedVecGroupIndex: 'Vec<Vec<u32>>',
/**
* Lookup708: polkadot_primitives::vstaging::executor_params::ExecutorParams
* Lookup712: polkadot_primitives::vstaging::executor_params::ExecutorParams
**/
PolkadotPrimitivesVstagingExecutorParams: 'Vec<PolkadotPrimitivesVstagingExecutorParamsExecutorParam>',
/**
* Lookup710: polkadot_primitives::vstaging::executor_params::ExecutorParam
* Lookup714: polkadot_primitives::vstaging::executor_params::ExecutorParam
**/
PolkadotPrimitivesVstagingExecutorParamsExecutorParam: {
_enum: {
@@ -2330,7 +2330,7 @@ export default {
}
},
/**
* Lookup712: polkadot_primitives::v2::DisputeState<N>
* Lookup716: polkadot_primitives::v2::DisputeState<N>
**/
PolkadotPrimitivesV2DisputeState: {
validatorsFor: 'BitVec',
@@ -2339,13 +2339,13 @@ export default {
concludedAt: 'Option<u32>'
},
/**
* Lookup714: polkadot_runtime_parachains::disputes::pallet::Error<T>
* Lookup718: polkadot_runtime_parachains::disputes::pallet::Error<T>
**/
PolkadotRuntimeParachainsDisputesPalletError: {
_enum: ['DuplicateDisputeStatementSets', 'AncientDisputeStatement', 'ValidatorIndexOutOfBounds', 'InvalidSignature', 'DuplicateStatement', 'SingleSidedDispute', 'MaliciousBacker', 'MissingBackingVotes', 'UnconfirmedDispute']
},
/**
* Lookup715: polkadot_runtime_common::paras_registrar::ParaInfo<sp_core::crypto::AccountId32, Balance>
* Lookup719: polkadot_runtime_common::paras_registrar::ParaInfo<sp_core::crypto::AccountId32, Balance>
**/
PolkadotRuntimeCommonParasRegistrarParaInfo: {
manager: 'AccountId32',
@@ -2353,25 +2353,25 @@ export default {
locked: 'bool'
},
/**
* Lookup716: polkadot_runtime_common::paras_registrar::pallet::Error<T>
* Lookup720: polkadot_runtime_common::paras_registrar::pallet::Error<T>
**/
PolkadotRuntimeCommonParasRegistrarPalletError: {
_enum: ['NotRegistered', 'AlreadyRegistered', 'NotOwner', 'CodeTooLarge', 'HeadDataTooLarge', 'NotParachain', 'NotParathread', 'CannotDeregister', 'CannotDowngrade', 'CannotUpgrade', 'ParaLocked', 'NotReserved', 'EmptyCode', 'CannotSwap']
},
/**
* Lookup718: polkadot_runtime_common::slots::pallet::Error<T>
* Lookup722: polkadot_runtime_common::slots::pallet::Error<T>
**/
PolkadotRuntimeCommonSlotsPalletError: {
_enum: ['ParaNotOnboarding', 'LeaseError']
},
/**
* Lookup723: polkadot_runtime_common::auctions::pallet::Error<T>
* Lookup727: polkadot_runtime_common::auctions::pallet::Error<T>
**/
PolkadotRuntimeCommonAuctionsPalletError: {
_enum: ['AuctionInProgress', 'LeasePeriodInPast', 'ParaNotRegistered', 'NotCurrentAuction', 'NotAuction', 'AuctionEnded', 'AlreadyLeasedOut']
},
/**
* Lookup724: polkadot_runtime_common::crowdloan::FundInfo<sp_core::crypto::AccountId32, Balance, BlockNumber, LeasePeriod>
* Lookup728: polkadot_runtime_common::crowdloan::FundInfo<sp_core::crypto::AccountId32, Balance, BlockNumber, LeasePeriod>
**/
PolkadotRuntimeCommonCrowdloanFundInfo: {
depositor: 'AccountId32',
@@ -2386,7 +2386,7 @@ export default {
fundIndex: 'u32'
},
/**
* Lookup725: polkadot_runtime_common::crowdloan::LastContribution<BlockNumber>
* Lookup729: polkadot_runtime_common::crowdloan::LastContribution<BlockNumber>
**/
PolkadotRuntimeCommonCrowdloanLastContribution: {
_enum: {
@@ -2396,13 +2396,13 @@ export default {
}
},
/**
* Lookup726: polkadot_runtime_common::crowdloan::pallet::Error<T>
* Lookup730: polkadot_runtime_common::crowdloan::pallet::Error<T>
**/
PolkadotRuntimeCommonCrowdloanPalletError: {
_enum: ['FirstPeriodInPast', 'FirstPeriodTooFarInFuture', 'LastPeriodBeforeFirstPeriod', 'LastPeriodTooFarInFuture', 'CannotEndInPast', 'EndTooFarInFuture', 'Overflow', 'ContributionTooSmall', 'InvalidParaId', 'CapExceeded', 'ContributionPeriodOver', 'InvalidOrigin', 'NotParachain', 'LeaseActive', 'BidOrLeaseActive', 'FundNotEnded', 'NoContributions', 'NotReadyToDissolve', 'InvalidSignature', 'MemoTooLarge', 'AlreadyInNewRaise', 'VrfDelayInProgress', 'NoLeasePeriod']
},
/**
* Lookup727: pallet_xcm::pallet::QueryStatus<BlockNumber>
* Lookup731: pallet_xcm::pallet::QueryStatus<BlockNumber>
**/
PalletXcmQueryStatus: {
_enum: {
@@ -2423,7 +2423,7 @@ export default {
}
},
/**
* Lookup731: xcm::VersionedResponse
* Lookup735: xcm::VersionedResponse
**/
XcmVersionedResponse: {
_enum: {
@@ -2432,7 +2432,7 @@ export default {
}
},
/**
* Lookup737: pallet_xcm::pallet::VersionMigrationStage
* Lookup741: pallet_xcm::pallet::VersionMigrationStage
**/
PalletXcmVersionMigrationStage: {
_enum: {
@@ -2443,7 +2443,7 @@ export default {
}
},
/**
* Lookup740: xcm::VersionedAssetId
* Lookup744: xcm::VersionedAssetId
**/
XcmVersionedAssetId: {
_enum: {
@@ -2451,7 +2451,7 @@ export default {
}
},
/**
* Lookup741: pallet_xcm::pallet::RemoteLockedFungibleRecord
* Lookup745: pallet_xcm::pallet::RemoteLockedFungibleRecord
**/
PalletXcmRemoteLockedFungibleRecord: {
amount: 'u128',
@@ -2460,21 +2460,21 @@ export default {
users: 'u32'
},
/**
* Lookup745: pallet_xcm::pallet::Error<T>
* Lookup749: pallet_xcm::pallet::Error<T>
**/
PalletXcmError: {
_enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed', 'InvalidAsset', 'LowBalance', 'TooManyLocks', 'AccountNotSovereign', 'FeesNotMet', 'LockNotFound', 'InUse']
},
/**
* Lookup756: pallet_transaction_payment::ChargeTransactionPayment<T>
* Lookup760: pallet_transaction_payment::ChargeTransactionPayment<T>
**/
PalletTransactionPaymentChargeTransactionPayment: 'Compact<u128>',
/**
* Lookup757: polkadot_runtime_common::claims::PrevalidateAttests<T>
* Lookup761: polkadot_runtime_common::claims::PrevalidateAttests<T>
**/
PolkadotRuntimeCommonClaimsPrevalidateAttests: 'Null',
/**
* Lookup758: polkadot_runtime::Runtime
* Lookup762: polkadot_runtime::Runtime
**/
PolkadotRuntimeRuntime: 'Null'
};
File diff suppressed because it is too large Load Diff
@@ -111,7 +111,7 @@ declare module '@polkadot/types/lookup' {
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
}
/** @name KusamaRuntimeRuntime (876) */
/** @name KusamaRuntimeRuntime (880) */
type KusamaRuntimeRuntime = Null;
} // declare module
@@ -1149,7 +1149,7 @@ declare module '@polkadot/types/lookup' {
readonly votes16: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
}
/** @name PolkadotRuntimeParachainsConfigurationPalletCall (394) */
/** @name PolkadotRuntimeParachainsConfigurationPalletCall (395) */
interface PolkadotRuntimeParachainsConfigurationPalletCall extends Enum {
readonly isSetValidationUpgradeCooldown: boolean;
readonly asSetValidationUpgradeCooldown: {
@@ -1330,13 +1330,13 @@ declare module '@polkadot/types/lookup' {
readonly type: 'SetValidationUpgradeCooldown' | 'SetValidationUpgradeDelay' | 'SetCodeRetentionPeriod' | 'SetMaxCodeSize' | 'SetMaxPovSize' | 'SetMaxHeadDataSize' | 'SetParathreadCores' | 'SetParathreadRetries' | 'SetGroupRotationFrequency' | 'SetChainAvailabilityPeriod' | 'SetThreadAvailabilityPeriod' | 'SetSchedulingLookahead' | 'SetMaxValidatorsPerCore' | 'SetMaxValidators' | 'SetDisputePeriod' | 'SetDisputePostConclusionAcceptancePeriod' | 'SetDisputeConclusionByTimeOutPeriod' | 'SetNoShowSlots' | 'SetNDelayTranches' | 'SetZerothDelayTrancheWidth' | 'SetNeededApprovals' | 'SetRelayVrfModuloSamples' | 'SetMaxUpwardQueueCount' | 'SetMaxUpwardQueueSize' | 'SetMaxDownwardMessageSize' | 'SetUmpServiceTotalWeight' | 'SetMaxUpwardMessageSize' | 'SetMaxUpwardMessageNumPerCandidate' | 'SetHrmpOpenRequestTtl' | 'SetHrmpSenderDeposit' | 'SetHrmpRecipientDeposit' | 'SetHrmpChannelMaxCapacity' | 'SetHrmpChannelMaxTotalSize' | 'SetHrmpMaxParachainInboundChannels' | 'SetHrmpMaxParathreadInboundChannels' | 'SetHrmpChannelMaxMessageSize' | 'SetHrmpMaxParachainOutboundChannels' | 'SetHrmpMaxParathreadOutboundChannels' | 'SetHrmpMaxMessageNumPerCandidate' | 'SetUmpMaxIndividualWeight' | 'SetPvfCheckingEnabled' | 'SetPvfVotingTtl' | 'SetMinimumValidationUpgradeDelay' | 'SetBypassConsistencyCheck';
}
/** @name PolkadotRuntimeParachainsSharedPalletCall (395) */
/** @name PolkadotRuntimeParachainsSharedPalletCall (396) */
type PolkadotRuntimeParachainsSharedPalletCall = Null;
/** @name PolkadotRuntimeParachainsInclusionPalletCall (396) */
/** @name PolkadotRuntimeParachainsInclusionPalletCall (397) */
type PolkadotRuntimeParachainsInclusionPalletCall = Null;
/** @name PolkadotRuntimeParachainsParasInherentPalletCall (397) */
/** @name PolkadotRuntimeParachainsParasInherentPalletCall (398) */
interface PolkadotRuntimeParachainsParasInherentPalletCall extends Enum {
readonly isEnter: boolean;
readonly asEnter: {
@@ -1345,7 +1345,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Enter';
}
/** @name PolkadotPrimitivesV2InherentData (398) */
/** @name PolkadotPrimitivesV2InherentData (399) */
interface PolkadotPrimitivesV2InherentData extends Struct {
readonly bitfields: Vec<PolkadotPrimitivesV2SignedUncheckedSigned>;
readonly backedCandidates: Vec<PolkadotPrimitivesV2BackedCandidate>;
@@ -1353,33 +1353,33 @@ declare module '@polkadot/types/lookup' {
readonly parentHeader: SpRuntimeHeader;
}
/** @name PolkadotPrimitivesV2SignedUncheckedSigned (400) */
/** @name PolkadotPrimitivesV2SignedUncheckedSigned (401) */
interface PolkadotPrimitivesV2SignedUncheckedSigned extends Struct {
readonly payload: BitVec;
readonly validatorIndex: u32;
readonly signature: PolkadotPrimitivesV2ValidatorAppSignature;
}
/** @name BitvecOrderLsb0 (403) */
/** @name BitvecOrderLsb0 (404) */
type BitvecOrderLsb0 = Null;
/** @name PolkadotPrimitivesV2ValidatorAppSignature (405) */
/** @name PolkadotPrimitivesV2ValidatorAppSignature (406) */
interface PolkadotPrimitivesV2ValidatorAppSignature extends SpCoreSr25519Signature {}
/** @name PolkadotPrimitivesV2BackedCandidate (407) */
/** @name PolkadotPrimitivesV2BackedCandidate (408) */
interface PolkadotPrimitivesV2BackedCandidate extends Struct {
readonly candidate: PolkadotPrimitivesV2CommittedCandidateReceipt;
readonly validityVotes: Vec<PolkadotPrimitivesV2ValidityAttestation>;
readonly validatorIndices: BitVec;
}
/** @name PolkadotPrimitivesV2CommittedCandidateReceipt (408) */
/** @name PolkadotPrimitivesV2CommittedCandidateReceipt (409) */
interface PolkadotPrimitivesV2CommittedCandidateReceipt extends Struct {
readonly descriptor: PolkadotPrimitivesV2CandidateDescriptor;
readonly commitments: PolkadotPrimitivesV2CandidateCommitments;
}
/** @name PolkadotPrimitivesV2CandidateCommitments (409) */
/** @name PolkadotPrimitivesV2CandidateCommitments (410) */
interface PolkadotPrimitivesV2CandidateCommitments extends Struct {
readonly upwardMessages: Vec<Bytes>;
readonly horizontalMessages: Vec<PolkadotCorePrimitivesOutboundHrmpMessage>;
@@ -1389,13 +1389,13 @@ declare module '@polkadot/types/lookup' {
readonly hrmpWatermark: u32;
}
/** @name PolkadotCorePrimitivesOutboundHrmpMessage (412) */
/** @name PolkadotCorePrimitivesOutboundHrmpMessage (413) */
interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct {
readonly recipient: u32;
readonly data: Bytes;
}
/** @name PolkadotPrimitivesV2ValidityAttestation (417) */
/** @name PolkadotPrimitivesV2ValidityAttestation (418) */
interface PolkadotPrimitivesV2ValidityAttestation extends Enum {
readonly isImplicit: boolean;
readonly asImplicit: PolkadotPrimitivesV2ValidatorAppSignature;
@@ -1404,14 +1404,14 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Implicit' | 'Explicit';
}
/** @name PolkadotPrimitivesV2DisputeStatementSet (419) */
/** @name PolkadotPrimitivesV2DisputeStatementSet (420) */
interface PolkadotPrimitivesV2DisputeStatementSet extends Struct {
readonly candidateHash: H256;
readonly session: u32;
readonly statements: Vec<ITuple<[PolkadotPrimitivesV2DisputeStatement, u32, PolkadotPrimitivesV2ValidatorAppSignature]>>;
}
/** @name PolkadotPrimitivesV2DisputeStatement (422) */
/** @name PolkadotPrimitivesV2DisputeStatement (423) */
interface PolkadotPrimitivesV2DisputeStatement extends Enum {
readonly isValid: boolean;
readonly asValid: PolkadotPrimitivesV2ValidDisputeStatementKind;
@@ -1420,7 +1420,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Valid' | 'Invalid';
}
/** @name PolkadotPrimitivesV2ValidDisputeStatementKind (423) */
/** @name PolkadotPrimitivesV2ValidDisputeStatementKind (424) */
interface PolkadotPrimitivesV2ValidDisputeStatementKind extends Enum {
readonly isExplicit: boolean;
readonly isBackingSeconded: boolean;
@@ -1431,13 +1431,13 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Explicit' | 'BackingSeconded' | 'BackingValid' | 'ApprovalChecking';
}
/** @name PolkadotPrimitivesV2InvalidDisputeStatementKind (424) */
/** @name PolkadotPrimitivesV2InvalidDisputeStatementKind (425) */
interface PolkadotPrimitivesV2InvalidDisputeStatementKind extends Enum {
readonly isExplicit: boolean;
readonly type: 'Explicit';
}
/** @name PolkadotRuntimeParachainsParasPalletCall (425) */
/** @name PolkadotRuntimeParachainsParasPalletCall (426) */
interface PolkadotRuntimeParachainsParasPalletCall extends Enum {
readonly isForceSetCurrentCode: boolean;
readonly asForceSetCurrentCode: {
@@ -1480,7 +1480,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'ForceSetCurrentCode' | 'ForceSetCurrentHead' | 'ForceScheduleCodeUpgrade' | 'ForceNoteNewHead' | 'ForceQueueAction' | 'AddTrustedValidationCode' | 'PokeUnusedValidationCode' | 'IncludePvfCheckStatement';
}
/** @name PolkadotPrimitivesV2PvfCheckStatement (426) */
/** @name PolkadotPrimitivesV2PvfCheckStatement (427) */
interface PolkadotPrimitivesV2PvfCheckStatement extends Struct {
readonly accept: bool;
readonly subject: H256;
@@ -1488,7 +1488,7 @@ declare module '@polkadot/types/lookup' {
readonly validatorIndex: u32;
}
/** @name PolkadotRuntimeParachainsInitializerPalletCall (427) */
/** @name PolkadotRuntimeParachainsInitializerPalletCall (428) */
interface PolkadotRuntimeParachainsInitializerPalletCall extends Enum {
readonly isForceApprove: boolean;
readonly asForceApprove: {
@@ -1497,10 +1497,10 @@ declare module '@polkadot/types/lookup' {
readonly type: 'ForceApprove';
}
/** @name PolkadotRuntimeParachainsDmpPalletCall (428) */
/** @name PolkadotRuntimeParachainsDmpPalletCall (429) */
type PolkadotRuntimeParachainsDmpPalletCall = Null;
/** @name PolkadotRuntimeParachainsUmpPalletCall (429) */
/** @name PolkadotRuntimeParachainsUmpPalletCall (430) */
interface PolkadotRuntimeParachainsUmpPalletCall extends Enum {
readonly isServiceOverweight: boolean;
readonly asServiceOverweight: {
@@ -1510,7 +1510,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'ServiceOverweight';
}
/** @name PolkadotRuntimeParachainsHrmpPalletCall (430) */
/** @name PolkadotRuntimeParachainsHrmpPalletCall (431) */
interface PolkadotRuntimeParachainsHrmpPalletCall extends Enum {
readonly isHrmpInitOpenChannel: boolean;
readonly asHrmpInitOpenChannel: {
@@ -1555,13 +1555,13 @@ declare module '@polkadot/types/lookup' {
readonly type: 'HrmpInitOpenChannel' | 'HrmpAcceptOpenChannel' | 'HrmpCloseChannel' | 'ForceCleanHrmp' | 'ForceProcessHrmpOpen' | 'ForceProcessHrmpClose' | 'HrmpCancelOpenRequest' | 'ForceOpenHrmpChannel';
}
/** @name PolkadotRuntimeParachainsDisputesPalletCall (431) */
/** @name PolkadotRuntimeParachainsDisputesPalletCall (432) */
interface PolkadotRuntimeParachainsDisputesPalletCall extends Enum {
readonly isForceUnfreeze: boolean;
readonly type: 'ForceUnfreeze';
}
/** @name PolkadotRuntimeCommonParasRegistrarPalletCall (432) */
/** @name PolkadotRuntimeCommonParasRegistrarPalletCall (433) */
interface PolkadotRuntimeCommonParasRegistrarPalletCall extends Enum {
readonly isRegister: boolean;
readonly asRegister: {
@@ -1608,7 +1608,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Register' | 'ForceRegister' | 'Deregister' | 'Swap' | 'RemoveLock' | 'Reserve' | 'AddLock' | 'ScheduleCodeUpgrade' | 'SetCurrentHead';
}
/** @name PolkadotRuntimeCommonSlotsPalletCall (433) */
/** @name PolkadotRuntimeCommonSlotsPalletCall (434) */
interface PolkadotRuntimeCommonSlotsPalletCall extends Enum {
readonly isForceLease: boolean;
readonly asForceLease: {
@@ -1629,7 +1629,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'ForceLease' | 'ClearAllLeases' | 'TriggerOnboard';
}
/** @name PolkadotRuntimeCommonAuctionsPalletCall (434) */
/** @name PolkadotRuntimeCommonAuctionsPalletCall (435) */
interface PolkadotRuntimeCommonAuctionsPalletCall extends Enum {
readonly isNewAuction: boolean;
readonly asNewAuction: {
@@ -1648,7 +1648,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'NewAuction' | 'Bid' | 'CancelAuction';
}
/** @name PolkadotRuntimeCommonCrowdloanPalletCall (436) */
/** @name PolkadotRuntimeCommonCrowdloanPalletCall (437) */
interface PolkadotRuntimeCommonCrowdloanPalletCall extends Enum {
readonly isCreate: boolean;
readonly asCreate: {
@@ -1704,7 +1704,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Create' | 'Contribute' | 'Withdraw' | 'Refund' | 'Dissolve' | 'Edit' | 'AddMemo' | 'Poke' | 'ContributeAll';
}
/** @name SpRuntimeMultiSigner (438) */
/** @name SpRuntimeMultiSigner (439) */
interface SpRuntimeMultiSigner extends Enum {
readonly isEd25519: boolean;
readonly asEd25519: SpCoreEd25519Public;
@@ -1715,10 +1715,10 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';
}
/** @name SpCoreEcdsaPublic (439) */
/** @name SpCoreEcdsaPublic (440) */
interface SpCoreEcdsaPublic extends U8aFixed {}
/** @name PalletXcmCall (444) */
/** @name PalletXcmCall (445) */
interface PalletXcmCall extends Enum {
readonly isSend: boolean;
readonly asSend: {
@@ -1780,7 +1780,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Send' | 'TeleportAssets' | 'ReserveTransferAssets' | 'Execute' | 'ForceXcmVersion' | 'ForceDefaultXcmVersion' | 'ForceSubscribeVersionNotify' | 'ForceUnsubscribeVersionNotify' | 'LimitedReserveTransferAssets' | 'LimitedTeleportAssets';
}
/** @name XcmVersionedXcm (445) */
/** @name XcmVersionedXcm (446) */
interface XcmVersionedXcm extends Enum {
readonly isV2: boolean;
readonly asV2: XcmV2Xcm;
@@ -1789,10 +1789,10 @@ declare module '@polkadot/types/lookup' {
readonly type: 'V2' | 'V3';
}
/** @name XcmV2Xcm (446) */
/** @name XcmV2Xcm (447) */
interface XcmV2Xcm extends Vec<XcmV2Instruction> {}
/** @name XcmV2Instruction (448) */
/** @name XcmV2Instruction (449) */
interface XcmV2Instruction extends Enum {
readonly isWithdrawAsset: boolean;
readonly asWithdrawAsset: XcmV2MultiassetMultiAssets;
@@ -1912,7 +1912,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'WithdrawAsset' | 'ReserveAssetDeposited' | 'ReceiveTeleportedAsset' | 'QueryResponse' | 'TransferAsset' | 'TransferReserveAsset' | 'Transact' | 'HrmpNewChannelOpenRequest' | 'HrmpChannelAccepted' | 'HrmpChannelClosing' | 'ClearOrigin' | 'DescendOrigin' | 'ReportError' | 'DepositAsset' | 'DepositReserveAsset' | 'ExchangeAsset' | 'InitiateReserveWithdraw' | 'InitiateTeleport' | 'QueryHolding' | 'BuyExecution' | 'RefundSurplus' | 'SetErrorHandler' | 'SetAppendix' | 'ClearError' | 'ClaimAsset' | 'Trap' | 'SubscribeVersion' | 'UnsubscribeVersion';
}
/** @name XcmV2Response (449) */
/** @name XcmV2Response (450) */
interface XcmV2Response extends Enum {
readonly isNull: boolean;
readonly isAssets: boolean;
@@ -1924,7 +1924,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Null' | 'Assets' | 'ExecutionResult' | 'Version';
}
/** @name XcmV2TraitsError (452) */
/** @name XcmV2TraitsError (453) */
interface XcmV2TraitsError extends Enum {
readonly isOverflow: boolean;
readonly isUnimplemented: boolean;
@@ -1957,7 +1957,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Overflow' | 'Unimplemented' | 'UntrustedReserveLocation' | 'UntrustedTeleportLocation' | 'MultiLocationFull' | 'MultiLocationNotInvertible' | 'BadOrigin' | 'InvalidLocation' | 'AssetNotFound' | 'FailedToTransactAsset' | 'NotWithdrawable' | 'LocationCannotHold' | 'ExceedsMaxMessageSize' | 'DestinationUnsupported' | 'Transport' | 'Unroutable' | 'UnknownClaim' | 'FailedToDecode' | 'MaxWeightInvalid' | 'NotHoldingFees' | 'TooExpensive' | 'Trap' | 'UnhandledXcmVersion' | 'WeightLimitReached' | 'Barrier' | 'WeightNotComputable';
}
/** @name XcmV2MultiassetMultiAssetFilter (453) */
/** @name XcmV2MultiassetMultiAssetFilter (454) */
interface XcmV2MultiassetMultiAssetFilter extends Enum {
readonly isDefinite: boolean;
readonly asDefinite: XcmV2MultiassetMultiAssets;
@@ -1966,7 +1966,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Definite' | 'Wild';
}
/** @name XcmV2MultiassetWildMultiAsset (454) */
/** @name XcmV2MultiassetWildMultiAsset (455) */
interface XcmV2MultiassetWildMultiAsset extends Enum {
readonly isAll: boolean;
readonly isAllOf: boolean;
@@ -1977,14 +1977,14 @@ declare module '@polkadot/types/lookup' {
readonly type: 'All' | 'AllOf';
}
/** @name XcmV2MultiassetWildFungibility (455) */
/** @name XcmV2MultiassetWildFungibility (456) */
interface XcmV2MultiassetWildFungibility extends Enum {
readonly isFungible: boolean;
readonly isNonFungible: boolean;
readonly type: 'Fungible' | 'NonFungible';
}
/** @name XcmV2WeightLimit (456) */
/** @name XcmV2WeightLimit (457) */
interface XcmV2WeightLimit extends Enum {
readonly isUnlimited: boolean;
readonly isLimited: boolean;
@@ -1992,7 +1992,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Unlimited' | 'Limited';
}
/** @name PolkadotRuntimeCommonClaimsPalletError (572) */
/** @name PolkadotRuntimeCommonClaimsPalletError (576) */
interface PolkadotRuntimeCommonClaimsPalletError extends Enum {
readonly isInvalidEthereumSignature: boolean;
readonly isSignerHasNoClaim: boolean;
@@ -2003,7 +2003,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'InvalidEthereumSignature' | 'SignerHasNoClaim' | 'SenderHasNoClaim' | 'PotUnderflow' | 'InvalidStatement' | 'VestedBalanceExists';
}
/** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (647) */
/** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (651) */
interface PolkadotRuntimeParachainsConfigurationHostConfiguration extends Struct {
readonly maxCodeSize: u32;
readonly maxHeadDataSize: u32;
@@ -2049,19 +2049,19 @@ declare module '@polkadot/types/lookup' {
readonly minimumValidationUpgradeDelay: u32;
}
/** @name PolkadotRuntimeParachainsConfigurationPalletError (650) */
/** @name PolkadotRuntimeParachainsConfigurationPalletError (654) */
interface PolkadotRuntimeParachainsConfigurationPalletError extends Enum {
readonly isInvalidNewValue: boolean;
readonly type: 'InvalidNewValue';
}
/** @name PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord (653) */
/** @name PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord (657) */
interface PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord extends Struct {
readonly bitfield: BitVec;
readonly submittedAt: u32;
}
/** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (654) */
/** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (658) */
interface PolkadotRuntimeParachainsInclusionCandidatePendingAvailability extends Struct {
readonly core: u32;
readonly hash_: H256;
@@ -2073,7 +2073,7 @@ declare module '@polkadot/types/lookup' {
readonly backingGroup: u32;
}
/** @name PolkadotRuntimeParachainsInclusionPalletError (655) */
/** @name PolkadotRuntimeParachainsInclusionPalletError (659) */
interface PolkadotRuntimeParachainsInclusionPalletError extends Enum {
readonly isUnsortedOrDuplicateValidatorIndices: boolean;
readonly isUnsortedOrDuplicateDisputeStatementSet: boolean;
@@ -2107,14 +2107,14 @@ declare module '@polkadot/types/lookup' {
readonly type: 'UnsortedOrDuplicateValidatorIndices' | 'UnsortedOrDuplicateDisputeStatementSet' | 'UnsortedOrDuplicateBackedCandidates' | 'UnexpectedRelayParent' | 'WrongBitfieldSize' | 'BitfieldAllZeros' | 'BitfieldDuplicateOrUnordered' | 'ValidatorIndexOutOfBounds' | 'InvalidBitfieldSignature' | 'UnscheduledCandidate' | 'CandidateScheduledBeforeParaFree' | 'WrongCollator' | 'ScheduledOutOfOrder' | 'HeadDataTooLarge' | 'PrematureCodeUpgrade' | 'NewCodeTooLarge' | 'CandidateNotInParentContext' | 'InvalidGroupIndex' | 'InsufficientBacking' | 'InvalidBacking' | 'NotCollatorSigned' | 'ValidationDataHashMismatch' | 'IncorrectDownwardMessageHandling' | 'InvalidUpwardMessages' | 'HrmpWatermarkMishandling' | 'InvalidOutboundHrmp' | 'InvalidValidationCodeHash' | 'ParaHeadMismatch' | 'BitfieldReferencesFreedCore';
}
/** @name PolkadotPrimitivesV2ScrapedOnChainVotes (656) */
/** @name PolkadotPrimitivesV2ScrapedOnChainVotes (660) */
interface PolkadotPrimitivesV2ScrapedOnChainVotes extends Struct {
readonly session: u32;
readonly backingValidatorsPerCandidate: Vec<ITuple<[PolkadotPrimitivesV2CandidateReceipt, Vec<ITuple<[u32, PolkadotPrimitivesV2ValidityAttestation]>>]>>;
readonly disputes: Vec<PolkadotPrimitivesV2DisputeStatementSet>;
}
/** @name PolkadotRuntimeParachainsParasInherentPalletError (661) */
/** @name PolkadotRuntimeParachainsParasInherentPalletError (665) */
interface PolkadotRuntimeParachainsParasInherentPalletError extends Enum {
readonly isTooManyInclusionInherents: boolean;
readonly isInvalidParentHeader: boolean;
@@ -2125,28 +2125,28 @@ declare module '@polkadot/types/lookup' {
readonly type: 'TooManyInclusionInherents' | 'InvalidParentHeader' | 'CandidateConcludedInvalid' | 'InherentOverweight' | 'DisputeStatementsUnsortedOrDuplicates' | 'DisputeInvalid';
}
/** @name PolkadotRuntimeParachainsSchedulerParathreadClaimQueue (663) */
/** @name PolkadotRuntimeParachainsSchedulerParathreadClaimQueue (667) */
interface PolkadotRuntimeParachainsSchedulerParathreadClaimQueue extends Struct {
readonly queue: Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>;
readonly nextCoreOffset: u32;
}
/** @name PolkadotRuntimeParachainsSchedulerQueuedParathread (665) */
/** @name PolkadotRuntimeParachainsSchedulerQueuedParathread (669) */
interface PolkadotRuntimeParachainsSchedulerQueuedParathread extends Struct {
readonly claim: PolkadotPrimitivesV2ParathreadEntry;
readonly coreOffset: u32;
}
/** @name PolkadotPrimitivesV2ParathreadEntry (666) */
/** @name PolkadotPrimitivesV2ParathreadEntry (670) */
interface PolkadotPrimitivesV2ParathreadEntry extends Struct {
readonly claim: PolkadotPrimitivesV2ParathreadClaim;
readonly retries: u32;
}
/** @name PolkadotPrimitivesV2ParathreadClaim (667) */
/** @name PolkadotPrimitivesV2ParathreadClaim (671) */
interface PolkadotPrimitivesV2ParathreadClaim extends ITuple<[u32, PolkadotPrimitivesV2CollatorAppPublic]> {}
/** @name PolkadotPrimitivesV2CoreOccupied (670) */
/** @name PolkadotPrimitivesV2CoreOccupied (674) */
interface PolkadotPrimitivesV2CoreOccupied extends Enum {
readonly isParathread: boolean;
readonly asParathread: PolkadotPrimitivesV2ParathreadEntry;
@@ -2154,7 +2154,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Parathread' | 'Parachain';
}
/** @name PolkadotRuntimeParachainsSchedulerCoreAssignment (673) */
/** @name PolkadotRuntimeParachainsSchedulerCoreAssignment (677) */
interface PolkadotRuntimeParachainsSchedulerCoreAssignment extends Struct {
readonly core: u32;
readonly paraId: u32;
@@ -2162,7 +2162,7 @@ declare module '@polkadot/types/lookup' {
readonly groupIdx: u32;
}
/** @name PolkadotRuntimeParachainsSchedulerAssignmentKind (674) */
/** @name PolkadotRuntimeParachainsSchedulerAssignmentKind (678) */
interface PolkadotRuntimeParachainsSchedulerAssignmentKind extends Enum {
readonly isParachain: boolean;
readonly isParathread: boolean;
@@ -2170,7 +2170,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Parachain' | 'Parathread';
}
/** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (675) */
/** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (679) */
interface PolkadotRuntimeParachainsParasPvfCheckActiveVoteState extends Struct {
readonly votesAccept: BitVec;
readonly votesReject: BitVec;
@@ -2179,7 +2179,7 @@ declare module '@polkadot/types/lookup' {
readonly causes: Vec<PolkadotRuntimeParachainsParasPvfCheckCause>;
}
/** @name PolkadotRuntimeParachainsParasPvfCheckCause (677) */
/** @name PolkadotRuntimeParachainsParasPvfCheckCause (681) */
interface PolkadotRuntimeParachainsParasPvfCheckCause extends Enum {
readonly isOnboarding: boolean;
readonly asOnboarding: u32;
@@ -2191,7 +2191,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Onboarding' | 'Upgrade';
}
/** @name PolkadotRuntimeParachainsParasParaLifecycle (679) */
/** @name PolkadotRuntimeParachainsParasParaLifecycle (683) */
interface PolkadotRuntimeParachainsParasParaLifecycle extends Enum {
readonly isOnboarding: boolean;
readonly isParathread: boolean;
@@ -2203,39 +2203,39 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Onboarding' | 'Parathread' | 'Parachain' | 'UpgradingParathread' | 'DowngradingParachain' | 'OffboardingParathread' | 'OffboardingParachain';
}
/** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (681) */
/** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (685) */
interface PolkadotRuntimeParachainsParasParaPastCodeMeta extends Struct {
readonly upgradeTimes: Vec<PolkadotRuntimeParachainsParasReplacementTimes>;
readonly lastPruned: Option<u32>;
}
/** @name PolkadotRuntimeParachainsParasReplacementTimes (683) */
/** @name PolkadotRuntimeParachainsParasReplacementTimes (687) */
interface PolkadotRuntimeParachainsParasReplacementTimes extends Struct {
readonly expectedAt: u32;
readonly activatedAt: u32;
}
/** @name PolkadotPrimitivesV2UpgradeGoAhead (685) */
/** @name PolkadotPrimitivesV2UpgradeGoAhead (689) */
interface PolkadotPrimitivesV2UpgradeGoAhead extends Enum {
readonly isAbort: boolean;
readonly isGoAhead: boolean;
readonly type: 'Abort' | 'GoAhead';
}
/** @name PolkadotPrimitivesV2UpgradeRestriction (686) */
/** @name PolkadotPrimitivesV2UpgradeRestriction (690) */
interface PolkadotPrimitivesV2UpgradeRestriction extends Enum {
readonly isPresent: boolean;
readonly type: 'Present';
}
/** @name PolkadotRuntimeParachainsParasParaGenesisArgs (687) */
/** @name PolkadotRuntimeParachainsParasParaGenesisArgs (691) */
interface PolkadotRuntimeParachainsParasParaGenesisArgs extends Struct {
readonly genesisHead: Bytes;
readonly validationCode: Bytes;
readonly paraKind: bool;
}
/** @name PolkadotRuntimeParachainsParasPalletError (688) */
/** @name PolkadotRuntimeParachainsParasPalletError (692) */
interface PolkadotRuntimeParachainsParasPalletError extends Enum {
readonly isNotRegistered: boolean;
readonly isCannotOnboard: boolean;
@@ -2253,27 +2253,27 @@ declare module '@polkadot/types/lookup' {
readonly type: 'NotRegistered' | 'CannotOnboard' | 'CannotOffboard' | 'CannotUpgrade' | 'CannotDowngrade' | 'PvfCheckStatementStale' | 'PvfCheckStatementFuture' | 'PvfCheckValidatorIndexOutOfBounds' | 'PvfCheckInvalidSignature' | 'PvfCheckDoubleVote' | 'PvfCheckSubjectInvalid' | 'PvfCheckDisabled' | 'CannotUpgradeCode';
}
/** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (690) */
/** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (694) */
interface PolkadotRuntimeParachainsInitializerBufferedSessionChange extends Struct {
readonly validators: Vec<PolkadotPrimitivesV2ValidatorAppPublic>;
readonly queued: Vec<PolkadotPrimitivesV2ValidatorAppPublic>;
readonly sessionIndex: u32;
}
/** @name PolkadotCorePrimitivesInboundDownwardMessage (692) */
/** @name PolkadotCorePrimitivesInboundDownwardMessage (696) */
interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {
readonly sentAt: u32;
readonly msg: Bytes;
}
/** @name PolkadotRuntimeParachainsUmpPalletError (694) */
/** @name PolkadotRuntimeParachainsUmpPalletError (698) */
interface PolkadotRuntimeParachainsUmpPalletError extends Enum {
readonly isUnknownMessageIndex: boolean;
readonly isWeightOverLimit: boolean;
readonly type: 'UnknownMessageIndex' | 'WeightOverLimit';
}
/** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (695) */
/** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (699) */
interface PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest extends Struct {
readonly confirmed: bool;
readonly age: u32;
@@ -2283,7 +2283,7 @@ declare module '@polkadot/types/lookup' {
readonly maxTotalSize: u32;
}
/** @name PolkadotRuntimeParachainsHrmpHrmpChannel (697) */
/** @name PolkadotRuntimeParachainsHrmpHrmpChannel (701) */
interface PolkadotRuntimeParachainsHrmpHrmpChannel extends Struct {
readonly maxCapacity: u32;
readonly maxTotalSize: u32;
@@ -2295,13 +2295,13 @@ declare module '@polkadot/types/lookup' {
readonly recipientDeposit: u128;
}
/** @name PolkadotCorePrimitivesInboundHrmpMessage (699) */
/** @name PolkadotCorePrimitivesInboundHrmpMessage (703) */
interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {
readonly sentAt: u32;
readonly data: Bytes;
}
/** @name PolkadotRuntimeParachainsHrmpPalletError (702) */
/** @name PolkadotRuntimeParachainsHrmpPalletError (706) */
interface PolkadotRuntimeParachainsHrmpPalletError extends Enum {
readonly isOpenHrmpChannelToSelf: boolean;
readonly isOpenHrmpChannelInvalidRecipient: boolean;
@@ -2325,7 +2325,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'OpenHrmpChannelToSelf' | 'OpenHrmpChannelInvalidRecipient' | 'OpenHrmpChannelZeroCapacity' | 'OpenHrmpChannelCapacityExceedsLimit' | 'OpenHrmpChannelZeroMessageSize' | 'OpenHrmpChannelMessageSizeExceedsLimit' | 'OpenHrmpChannelAlreadyExists' | 'OpenHrmpChannelAlreadyRequested' | 'OpenHrmpChannelLimitExceeded' | 'AcceptHrmpChannelDoesntExist' | 'AcceptHrmpChannelAlreadyConfirmed' | 'AcceptHrmpChannelLimitExceeded' | 'CloseHrmpChannelUnauthorized' | 'CloseHrmpChannelDoesntExist' | 'CloseHrmpChannelAlreadyUnderway' | 'CancelHrmpOpenChannelUnauthorized' | 'OpenHrmpChannelDoesntExist' | 'OpenHrmpChannelAlreadyConfirmed' | 'WrongWitness';
}
/** @name PolkadotPrimitivesV2SessionInfo (704) */
/** @name PolkadotPrimitivesV2SessionInfo (708) */
interface PolkadotPrimitivesV2SessionInfo extends Struct {
readonly activeValidatorIndices: Vec<u32>;
readonly randomSeed: U8aFixed;
@@ -2342,16 +2342,16 @@ declare module '@polkadot/types/lookup' {
readonly neededApprovals: u32;
}
/** @name PolkadotPrimitivesV2IndexedVecValidatorIndex (705) */
/** @name PolkadotPrimitivesV2IndexedVecValidatorIndex (709) */
interface PolkadotPrimitivesV2IndexedVecValidatorIndex extends Vec<PolkadotPrimitivesV2ValidatorAppPublic> {}
/** @name PolkadotPrimitivesV2IndexedVecGroupIndex (707) */
/** @name PolkadotPrimitivesV2IndexedVecGroupIndex (711) */
interface PolkadotPrimitivesV2IndexedVecGroupIndex extends Vec<Vec<u32>> {}
/** @name PolkadotPrimitivesVstagingExecutorParams (708) */
/** @name PolkadotPrimitivesVstagingExecutorParams (712) */
interface PolkadotPrimitivesVstagingExecutorParams extends Vec<PolkadotPrimitivesVstagingExecutorParamsExecutorParam> {}
/** @name PolkadotPrimitivesVstagingExecutorParamsExecutorParam (710) */
/** @name PolkadotPrimitivesVstagingExecutorParamsExecutorParam (714) */
interface PolkadotPrimitivesVstagingExecutorParamsExecutorParam extends Enum {
readonly isMaxMemoryPages: boolean;
readonly asMaxMemoryPages: u32;
@@ -2364,7 +2364,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'MaxMemoryPages' | 'StackLogicalMax' | 'StackNativeMax' | 'PrecheckingMaxMemory';
}
/** @name PolkadotPrimitivesV2DisputeState (712) */
/** @name PolkadotPrimitivesV2DisputeState (716) */
interface PolkadotPrimitivesV2DisputeState extends Struct {
readonly validatorsFor: BitVec;
readonly validatorsAgainst: BitVec;
@@ -2372,7 +2372,7 @@ declare module '@polkadot/types/lookup' {
readonly concludedAt: Option<u32>;
}
/** @name PolkadotRuntimeParachainsDisputesPalletError (714) */
/** @name PolkadotRuntimeParachainsDisputesPalletError (718) */
interface PolkadotRuntimeParachainsDisputesPalletError extends Enum {
readonly isDuplicateDisputeStatementSets: boolean;
readonly isAncientDisputeStatement: boolean;
@@ -2386,14 +2386,14 @@ declare module '@polkadot/types/lookup' {
readonly type: 'DuplicateDisputeStatementSets' | 'AncientDisputeStatement' | 'ValidatorIndexOutOfBounds' | 'InvalidSignature' | 'DuplicateStatement' | 'SingleSidedDispute' | 'MaliciousBacker' | 'MissingBackingVotes' | 'UnconfirmedDispute';
}
/** @name PolkadotRuntimeCommonParasRegistrarParaInfo (715) */
/** @name PolkadotRuntimeCommonParasRegistrarParaInfo (719) */
interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct {
readonly manager: AccountId32;
readonly deposit: u128;
readonly locked: bool;
}
/** @name PolkadotRuntimeCommonParasRegistrarPalletError (716) */
/** @name PolkadotRuntimeCommonParasRegistrarPalletError (720) */
interface PolkadotRuntimeCommonParasRegistrarPalletError extends Enum {
readonly isNotRegistered: boolean;
readonly isAlreadyRegistered: boolean;
@@ -2412,14 +2412,14 @@ declare module '@polkadot/types/lookup' {
readonly type: 'NotRegistered' | 'AlreadyRegistered' | 'NotOwner' | 'CodeTooLarge' | 'HeadDataTooLarge' | 'NotParachain' | 'NotParathread' | 'CannotDeregister' | 'CannotDowngrade' | 'CannotUpgrade' | 'ParaLocked' | 'NotReserved' | 'EmptyCode' | 'CannotSwap';
}
/** @name PolkadotRuntimeCommonSlotsPalletError (718) */
/** @name PolkadotRuntimeCommonSlotsPalletError (722) */
interface PolkadotRuntimeCommonSlotsPalletError extends Enum {
readonly isParaNotOnboarding: boolean;
readonly isLeaseError: boolean;
readonly type: 'ParaNotOnboarding' | 'LeaseError';
}
/** @name PolkadotRuntimeCommonAuctionsPalletError (723) */
/** @name PolkadotRuntimeCommonAuctionsPalletError (727) */
interface PolkadotRuntimeCommonAuctionsPalletError extends Enum {
readonly isAuctionInProgress: boolean;
readonly isLeasePeriodInPast: boolean;
@@ -2431,7 +2431,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'AuctionInProgress' | 'LeasePeriodInPast' | 'ParaNotRegistered' | 'NotCurrentAuction' | 'NotAuction' | 'AuctionEnded' | 'AlreadyLeasedOut';
}
/** @name PolkadotRuntimeCommonCrowdloanFundInfo (724) */
/** @name PolkadotRuntimeCommonCrowdloanFundInfo (728) */
interface PolkadotRuntimeCommonCrowdloanFundInfo extends Struct {
readonly depositor: AccountId32;
readonly verifier: Option<SpRuntimeMultiSigner>;
@@ -2445,7 +2445,7 @@ declare module '@polkadot/types/lookup' {
readonly fundIndex: u32;
}
/** @name PolkadotRuntimeCommonCrowdloanLastContribution (725) */
/** @name PolkadotRuntimeCommonCrowdloanLastContribution (729) */
interface PolkadotRuntimeCommonCrowdloanLastContribution extends Enum {
readonly isNever: boolean;
readonly isPreEnding: boolean;
@@ -2455,7 +2455,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Never' | 'PreEnding' | 'Ending';
}
/** @name PolkadotRuntimeCommonCrowdloanPalletError (726) */
/** @name PolkadotRuntimeCommonCrowdloanPalletError (730) */
interface PolkadotRuntimeCommonCrowdloanPalletError extends Enum {
readonly isFirstPeriodInPast: boolean;
readonly isFirstPeriodTooFarInFuture: boolean;
@@ -2483,7 +2483,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'FirstPeriodInPast' | 'FirstPeriodTooFarInFuture' | 'LastPeriodBeforeFirstPeriod' | 'LastPeriodTooFarInFuture' | 'CannotEndInPast' | 'EndTooFarInFuture' | 'Overflow' | 'ContributionTooSmall' | 'InvalidParaId' | 'CapExceeded' | 'ContributionPeriodOver' | 'InvalidOrigin' | 'NotParachain' | 'LeaseActive' | 'BidOrLeaseActive' | 'FundNotEnded' | 'NoContributions' | 'NotReadyToDissolve' | 'InvalidSignature' | 'MemoTooLarge' | 'AlreadyInNewRaise' | 'VrfDelayInProgress' | 'NoLeasePeriod';
}
/** @name PalletXcmQueryStatus (727) */
/** @name PalletXcmQueryStatus (731) */
interface PalletXcmQueryStatus extends Enum {
readonly isPending: boolean;
readonly asPending: {
@@ -2505,7 +2505,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Pending' | 'VersionNotifier' | 'Ready';
}
/** @name XcmVersionedResponse (731) */
/** @name XcmVersionedResponse (735) */
interface XcmVersionedResponse extends Enum {
readonly isV2: boolean;
readonly asV2: XcmV2Response;
@@ -2514,7 +2514,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'V2' | 'V3';
}
/** @name PalletXcmVersionMigrationStage (737) */
/** @name PalletXcmVersionMigrationStage (741) */
interface PalletXcmVersionMigrationStage extends Enum {
readonly isMigrateSupportedVersion: boolean;
readonly isMigrateVersionNotifiers: boolean;
@@ -2524,14 +2524,14 @@ declare module '@polkadot/types/lookup' {
readonly type: 'MigrateSupportedVersion' | 'MigrateVersionNotifiers' | 'NotifyCurrentTargets' | 'MigrateAndNotifyOldTargets';
}
/** @name XcmVersionedAssetId (740) */
/** @name XcmVersionedAssetId (744) */
interface XcmVersionedAssetId extends Enum {
readonly isV3: boolean;
readonly asV3: XcmV3MultiassetAssetId;
readonly type: 'V3';
}
/** @name PalletXcmRemoteLockedFungibleRecord (741) */
/** @name PalletXcmRemoteLockedFungibleRecord (745) */
interface PalletXcmRemoteLockedFungibleRecord extends Struct {
readonly amount: u128;
readonly owner: XcmVersionedMultiLocation;
@@ -2539,7 +2539,7 @@ declare module '@polkadot/types/lookup' {
readonly users: u32;
}
/** @name PalletXcmError (745) */
/** @name PalletXcmError (749) */
interface PalletXcmError extends Enum {
readonly isUnreachable: boolean;
readonly isSendFailure: boolean;
@@ -2564,13 +2564,13 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed' | 'InvalidAsset' | 'LowBalance' | 'TooManyLocks' | 'AccountNotSovereign' | 'FeesNotMet' | 'LockNotFound' | 'InUse';
}
/** @name PalletTransactionPaymentChargeTransactionPayment (756) */
/** @name PalletTransactionPaymentChargeTransactionPayment (760) */
interface PalletTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
/** @name PolkadotRuntimeCommonClaimsPrevalidateAttests (757) */
/** @name PolkadotRuntimeCommonClaimsPrevalidateAttests (761) */
type PolkadotRuntimeCommonClaimsPrevalidateAttests = Null;
/** @name PolkadotRuntimeRuntime (758) */
/** @name PolkadotRuntimeRuntime (762) */
type PolkadotRuntimeRuntime = Null;
} // declare module
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '9.14.2' };
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '10.0.1' };
File diff suppressed because one or more lines are too long

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