Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b269d25b8 | ||
|
|
86f3f4748a | ||
|
|
3773ae8ed5 | ||
|
|
b8dd03f25c | ||
|
|
a0a787d8b9 | ||
|
|
1b72a1cb11 | ||
|
|
c334c161f0 | ||
|
|
311cbe5fee | ||
|
|
cf7e2f01ac | ||
|
|
4863709083 | ||
|
|
a1d7cad9d8 | ||
|
|
7f7acd6421 | ||
|
|
a5c5f76aee | ||
|
|
d0905268a4 | ||
|
|
852cbeb123 | ||
|
|
8f94c8852e | ||
|
|
95d4d7ee71 | ||
|
|
e6d40eb8d0 | ||
|
|
3f73f4dbf5 | ||
|
|
bbd52e5150 | ||
|
|
dc5c66e8af | ||
|
|
9db7d8d290 | ||
|
|
a1c43fed9e | ||
|
|
ed62d164ea | ||
|
|
3d45da3195 | ||
|
|
fff3bb912c | ||
|
|
c959bf928b | ||
|
|
9f48d1447e | ||
|
|
826470d213 | ||
|
|
b9d6b298be | ||
|
|
01883dd869 | ||
|
|
9ae085b575 | ||
|
|
f5b8622d1e | ||
|
|
03fb086ac8 | ||
|
|
70cda770e1 | ||
|
|
9f3e3dba4d | ||
|
|
9505fe5060 | ||
|
|
dada3b4371 | ||
|
|
8db5e2b1b7 | ||
|
|
6a903db371 | ||
|
|
d67bcd4f39 | ||
|
|
014dc29ccf | ||
|
|
dd9cc04d6b | ||
|
|
a15433ec0e | ||
|
|
1996dd477c | ||
|
|
21a28e003a | ||
|
|
7bd4c7afb0 | ||
|
|
5edb5d9b57 |
+58
-4
@@ -1,5 +1,59 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 15.9.2 Apr 15, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Enhance property access validation in Struct decoding ([#6126](https://github.com/polkadot-js/api/pull/6126))
|
||||
- Improve type registry known defaults implementation to a Map ([#6127](https://github.com/polkadot-js/api/pull/6127))
|
||||
- bump polkadot/common to 13.4.4 ([#6128](https://github.com/polkadot-js/api/pull/6128))
|
||||
|
||||
|
||||
## 15.9.1 Mar 27, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix signAsync() docs ([#6121](https://github.com/polkadot-js/api/pull/6121))
|
||||
- Make TTL configurable on WsProvider & HttpProvider ([#6123](https://github.com/polkadot-js/api/pull/6123))
|
||||
|
||||
|
||||
## 15.8.1 Mar 10, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Add derives to obtain Extrinsic Information ([#6113](https://github.com/polkadot-js/api/pull/6113))
|
||||
|
||||
|
||||
## 15.7.2 Mar 3, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Update asset-hub type-support metadata files for v1.4.0 ([#6105](https://github.com/polkadot-js/api/pull/6105))
|
||||
- Document available Api Derives ([#6106](https://github.com/polkadot-js/api/pull/6106))
|
||||
- Fix derives base path in typegen ([#6107](https://github.com/polkadot-js/api/pull/6107))
|
||||
|
||||
|
||||
## 15.7.1 Feb 25, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Upgrade Kusama types to 1.4.0 ([#6098](https://github.com/polkadot-js/api/pull/6098))
|
||||
- Api-Derives documentation generator ([#6099](https://github.com/polkadot-js/api/pull/6099))
|
||||
- Upgrade Polkadot types to v1.4.0 ([#6100](https://github.com/polkadot-js/api/pull/6100))
|
||||
- Add WeightReclaim transaction extension to known extensions ([#6102](https://github.com/polkadot-js/api/pull/6102))
|
||||
- Add westend code upgrades ([#6103 ](https://github.com/polkadot-js/api/pull/6103))
|
||||
|
||||
|
||||
## 15.6.1 Feb 17, 2025
|
||||
|
||||
Changes:
|
||||
|
||||
- Log Http/Ws request on error [#6091](https://github.com/polkadot-js/api/pull/6091)
|
||||
- Only identify Struct as empty when it has no keys. [#6092](https://github.com/polkadot-js/api/pull/6092)
|
||||
- Check for api.query.identity in getSubIdentities [#6093](https://github.com/polkadot-js/api/pull/6093)
|
||||
- Upgrade common to 13.4.3 [#6095](https://github.com/polkadot-js/api/pull/6095)
|
||||
|
||||
|
||||
## 15.5.2 Feb 3, 2025
|
||||
|
||||
Changes:
|
||||
@@ -266,7 +320,7 @@ Contributed:
|
||||
|
||||
Changes:
|
||||
|
||||
- Update Augmented types for polkadot 1002005
|
||||
- Update Augmented types for polkadot 1002005
|
||||
- Update Augmented types for kusama 1002006
|
||||
- Note: This removes type support for the Identity pallet for Kusama, and stateTrieMigration
|
||||
- Update upgrade blocks for {Kusama, Polkadot}
|
||||
@@ -398,7 +452,7 @@ Contributed:
|
||||
Changes:
|
||||
|
||||
- Upgrade westend types-known for 1009000
|
||||
- Add `disableAscii` option for toHuman, and toPrimitive
|
||||
- Add `disableAscii` option for toHuman, and toPrimitive
|
||||
- V14 Update substrate latest metadata
|
||||
- V15 Update substrate latest metadata
|
||||
- Bump yarn to 4.1.1
|
||||
@@ -422,7 +476,7 @@ Contributed:
|
||||
Changes:
|
||||
|
||||
- Upgrade westend types-known for 1009000
|
||||
- Add `disableAscii` option for toHuman, and toPrimitive
|
||||
- Add `disableAscii` option for toHuman, and toPrimitive
|
||||
- V14 Update substrate latest metadata
|
||||
- V15 Update substrate latest metadata
|
||||
- Bump yarn to 4.1.1
|
||||
@@ -458,7 +512,7 @@ Changes:
|
||||
- Fix invalid Lookup assignment on augmentation and update polkadot and kusama metadata
|
||||
- Update polkadot runtime upgrade per block
|
||||
- Update kusama runtime upgrade per block
|
||||
- Update westend runtime upgrade per block
|
||||
- Update westend runtime upgrade per block
|
||||
|
||||
## 10.12.2 Mar 11, 2024
|
||||
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
3512 Jaco Bump deps (#5785)
|
||||
159 Tarik Gul 15.5.2 (#6086)
|
||||
163 Tarik Gul Improve type registry known defaults implementation to a Map (#6127)
|
||||
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)
|
||||
23 Valentin Fernandez 15.9.2 (#6129)
|
||||
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
||||
19 Xiliang Chen no warm for unknown signed extensions (#5601)
|
||||
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
||||
@@ -11,7 +12,6 @@
|
||||
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
||||
6 Andreea Eftene Update check for contract instantiation (#5699)
|
||||
6 Branislav Kontur Fix for fungiblesApi (#5944)
|
||||
6 Valentin Fernandez Include missing known keys (#6084)
|
||||
5 Alberto Nicolas Penayo added use of accountNonceApi (#5915)
|
||||
5 Chevdor Fix metadata package link (#3458)
|
||||
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
||||
@@ -27,6 +27,7 @@
|
||||
3 André Silva add support for ValidationCodeHash (#3640)
|
||||
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
||||
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
||||
3 Arjun Porwal Upgrade Polkadot types to v1.4.0 (#6100)
|
||||
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
||||
3 hamidra add support for n key entries for NMaps (#3886)
|
||||
3 Hamza Tokuchi more typos (#2532)
|
||||
|
||||
+3
-3
@@ -14,10 +14,10 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "15.5.2",
|
||||
"version": "15.9.2",
|
||||
"versions": {
|
||||
"git": "15.5.2",
|
||||
"npm": "15.5.2"
|
||||
"git": "15.9.2",
|
||||
"npm": "15.9.2"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.5.2",
|
||||
"version": "15.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api-base": "15.5.2",
|
||||
"@polkadot/rpc-augment": "15.5.2",
|
||||
"@polkadot/types": "15.5.2",
|
||||
"@polkadot/types-augment": "15.5.2",
|
||||
"@polkadot/types-codec": "15.5.2",
|
||||
"@polkadot/util": "^13.3.1",
|
||||
"@polkadot/api-base": "15.9.2",
|
||||
"@polkadot/rpc-augment": "15.9.2",
|
||||
"@polkadot/types": "15.9.2",
|
||||
"@polkadot/types-augment": "15.9.2",
|
||||
"@polkadot/types-codec": "15.9.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"tslib": "^2.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,6 +240,20 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
delegatedStaking: {
|
||||
/**
|
||||
* Injected identifier for the pallet.
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Fraction of the slash that is rewarded to the caller of pending slash to the agent.
|
||||
**/
|
||||
slashRewardFraction: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
|
||||
@@ -149,9 +149,21 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
InvalidConfiguration: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An equivocation proof provided as part of an equivocation report is invalid.
|
||||
* A double voting proof provided as part of an equivocation report is invalid.
|
||||
**/
|
||||
InvalidEquivocationProof: AugmentedError<ApiType>;
|
||||
InvalidDoubleVotingProof: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The session of the equivocation proof is invalid
|
||||
**/
|
||||
InvalidEquivocationProofSession: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A fork voting proof provided as part of an equivocation report is invalid.
|
||||
**/
|
||||
InvalidForkVotingProof: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A future block voting proof provided as part of an equivocation report is invalid.
|
||||
**/
|
||||
InvalidFutureBlockVotingProof: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A key ownership proof provided as part of an equivocation report is invalid.
|
||||
**/
|
||||
@@ -472,6 +484,64 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
delegatedStaking: {
|
||||
/**
|
||||
* An existing staker cannot perform this action.
|
||||
**/
|
||||
AlreadyStaking: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Some corruption in internal state.
|
||||
**/
|
||||
BadState: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Delegation conditions are not met.
|
||||
*
|
||||
* Possible issues are
|
||||
* 1) Cannot delegate to self,
|
||||
* 2) Cannot delegate to multiple delegates.
|
||||
**/
|
||||
InvalidDelegation: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Reward Destination cannot be same as `Agent` account.
|
||||
**/
|
||||
InvalidRewardDestination: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Not an existing `Agent` account.
|
||||
**/
|
||||
NotAgent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The account cannot perform this operation.
|
||||
**/
|
||||
NotAllowed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Not a Delegator account.
|
||||
**/
|
||||
NotDelegator: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The account does not have enough funds to perform the operation.
|
||||
**/
|
||||
NotEnoughFunds: AugmentedError<ApiType>;
|
||||
/**
|
||||
* `Agent` has no pending slash to be applied.
|
||||
**/
|
||||
NothingToSlash: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Operation not supported by this pallet.
|
||||
**/
|
||||
NotSupported: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Unapplied pending slash restricts operation on `Agent`.
|
||||
**/
|
||||
UnappliedSlash: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Failed to withdraw amount from Core Staking.
|
||||
**/
|
||||
WithdrawFailed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* Some bound not met
|
||||
@@ -1210,6 +1280,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* A reward pool does not exist. In all cases this is a system logic error.
|
||||
**/
|
||||
RewardPoolNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The slash amount is too low to be applied.
|
||||
**/
|
||||
SlashTooLow: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A sub pool does not exist.
|
||||
**/
|
||||
@@ -1285,10 +1359,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Output code is too large
|
||||
**/
|
||||
NewCodeTooLarge: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Collator did not sign PoV.
|
||||
**/
|
||||
NotCollatorSigned: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The `para_head` hash in the candidate descriptor doesn't match the hash of the actual
|
||||
* para head in the commitments.
|
||||
@@ -1479,10 +1549,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Preimage has already been noted on-chain.
|
||||
**/
|
||||
AlreadyNoted: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No ticket with a cost was returned by [`Config::Consideration`] to store the preimage.
|
||||
**/
|
||||
NoCost: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The user is not authorized to perform this action.
|
||||
**/
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletSocietyGroupParams, PalletStakingForcing, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV7CandidateReceipt, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, StagingKusamaRuntimeProxyType, StagingKusamaRuntimeRuntimeParametersKey, StagingKusamaRuntimeRuntimeParametersValue, StagingXcmV4AssetAssets, StagingXcmV4Location, StagingXcmV4Response, StagingXcmV4TraitsOutcome, StagingXcmV4Xcm, XcmV3TraitsError, XcmVersionedAssets, XcmVersionedLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletSocietyGroupParams, PalletStakingForcing, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV8CandidateReceipt, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, StagingKusamaRuntimeProxyType, StagingKusamaRuntimeRuntimeParametersKey, StagingKusamaRuntimeRuntimeParametersValue, StagingXcmV4AssetAssets, StagingXcmV4Location, StagingXcmV4Response, StagingXcmV4TraitsOutcome, StagingXcmV4Xcm, XcmV3TraitsError, XcmVersionedAssets, XcmVersionedLocation } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||
|
||||
@@ -250,6 +250,14 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An \[account\] has cancelled a previous delegation operation.
|
||||
**/
|
||||
Undelegated: AugmentedEvent<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* An account that has voted
|
||||
**/
|
||||
Voted: AugmentedEvent<ApiType, [who: AccountId32, vote: PalletConvictionVotingVoteAccountVote], { who: AccountId32, vote: PalletConvictionVotingVoteAccountVote }>;
|
||||
/**
|
||||
* A vote that been removed
|
||||
**/
|
||||
VoteRemoved: AugmentedEvent<ApiType, [who: AccountId32, vote: PalletConvictionVotingVoteAccountVote], { who: AccountId32, vote: PalletConvictionVotingVoteAccountVote }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -316,6 +324,28 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
delegatedStaking: {
|
||||
/**
|
||||
* Funds delegated by a delegator.
|
||||
**/
|
||||
Delegated: AugmentedEvent<ApiType, [agent: AccountId32, delegator: AccountId32, amount: u128], { agent: AccountId32, delegator: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Unclaimed delegation funds migrated to delegator.
|
||||
**/
|
||||
MigratedDelegation: AugmentedEvent<ApiType, [agent: AccountId32, delegator: AccountId32, amount: u128], { agent: AccountId32, delegator: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Funds released to a delegator.
|
||||
**/
|
||||
Released: AugmentedEvent<ApiType, [agent: AccountId32, delegator: AccountId32, amount: u128], { agent: AccountId32, delegator: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Funds slashed from a delegator.
|
||||
**/
|
||||
Slashed: AugmentedEvent<ApiType, [agent: AccountId32, delegator: AccountId32, amount: u128], { agent: AccountId32, delegator: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* An election failed.
|
||||
@@ -735,8 +765,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A member has been removed from a pool.
|
||||
*
|
||||
* The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked).
|
||||
* Any funds that are still delegated (i.e. dangling delegation) are released and are
|
||||
* represented by `released_balance`.
|
||||
**/
|
||||
MemberRemoved: AugmentedEvent<ApiType, [poolId: u32, member: AccountId32], { poolId: u32, member: AccountId32 }>;
|
||||
MemberRemoved: AugmentedEvent<ApiType, [poolId: u32, member: AccountId32, releasedBalance: u128], { poolId: u32, member: AccountId32, releasedBalance: u128 }>;
|
||||
/**
|
||||
* Topped up deficit in frozen ED of the reward pool.
|
||||
**/
|
||||
@@ -844,15 +876,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* A candidate was backed. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV7CandidateReceipt, Bytes, u32, u32]>;
|
||||
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV8CandidateReceipt, Bytes, u32, u32]>;
|
||||
/**
|
||||
* A candidate was included. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV7CandidateReceipt, Bytes, u32, u32]>;
|
||||
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV8CandidateReceipt, Bytes, u32, u32]>;
|
||||
/**
|
||||
* A candidate timed out. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV7CandidateReceipt, Bytes, u32]>;
|
||||
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV8CandidateReceipt, Bytes, u32]>;
|
||||
/**
|
||||
* Some upward messages have been received and will be processed.
|
||||
**/
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { BTreeMap, BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, bo
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { BinaryHeapEnqueuedOrder, FrameSupportDispatchPerDispatchClassWeight, FrameSupportTokensMiscIdAmount, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyCandidacy, PalletSocietyGroupParams, PalletSocietyIntakeRecord, PalletSocietyMemberRecord, PalletSocietyPayoutRecord, PalletSocietyTally, PalletSocietyVote, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletTreasurySpendStatus, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV7AssignmentAppPublic, PolkadotPrimitivesV7DisputeState, PolkadotPrimitivesV7ExecutorParams, PolkadotPrimitivesV7ScrapedOnChainVotes, PolkadotPrimitivesV7SessionInfo, PolkadotPrimitivesV7SlashingPendingSlashes, PolkadotPrimitivesV7UpgradeGoAhead, PolkadotPrimitivesV7UpgradeRestriction, PolkadotPrimitivesV7ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsAssignerCoretimeCoreDescriptor, PolkadotRuntimeParachainsAssignerCoretimeSchedule, PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount, PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder, PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerPalletCoreOccupied, PolkadotRuntimeParachainsSchedulerPalletParasEntry, PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusGrandpaAppPublic, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingExposure, SpStakingExposurePage, SpStakingOffenceOffenceDetails, SpStakingPagedExposureMetadata, SpWeightsWeightV2Weight, StagingKusamaRuntimeRuntimeFreezeReason, StagingKusamaRuntimeRuntimeHoldReason, StagingKusamaRuntimeRuntimeParametersKey, StagingKusamaRuntimeRuntimeParametersValue, StagingKusamaRuntimeSessionKeys, StagingXcmV4Instruction, XcmVersionedAssetId, XcmVersionedLocation } from '@polkadot/types/lookup';
|
||||
import type { BinaryHeapEnqueuedOrder, FrameSupportDispatchPerDispatchClassWeight, FrameSupportTokensMiscIdAmount, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletDelegatedStakingAgentLedger, PalletDelegatedStakingDelegation, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyCandidacy, PalletSocietyGroupParams, PalletSocietyIntakeRecord, PalletSocietyMemberRecord, PalletSocietyPayoutRecord, PalletSocietyTally, PalletSocietyVote, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletTreasurySpendStatus, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV8AssignmentAppPublic, PolkadotPrimitivesV8DisputeState, PolkadotPrimitivesV8ExecutorParams, PolkadotPrimitivesV8ScrapedOnChainVotes, PolkadotPrimitivesV8SessionInfo, PolkadotPrimitivesV8SlashingPendingSlashes, PolkadotPrimitivesV8UpgradeGoAhead, PolkadotPrimitivesV8UpgradeRestriction, PolkadotPrimitivesV8ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsAssignerCoretimeCoreDescriptor, PolkadotRuntimeParachainsAssignerCoretimeSchedule, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsOnDemandTypesCoreAffinityCount, PolkadotRuntimeParachainsOnDemandTypesEnqueuedOrder, PolkadotRuntimeParachainsOnDemandTypesQueueStatusType, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerPalletCoreOccupied, PolkadotRuntimeParachainsSchedulerPalletParasEntry, PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusGrandpaAppPublic, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingExposure, SpStakingExposurePage, SpStakingOffenceOffenceDetails, SpStakingPagedExposureMetadata, SpWeightsWeightV2Weight, StagingKusamaRuntimeRuntimeFreezeReason, StagingKusamaRuntimeRuntimeHoldReason, StagingKusamaRuntimeRuntimeParametersKey, StagingKusamaRuntimeRuntimeParametersValue, StagingKusamaRuntimeSessionKeys, StagingXcmV4Instruction, XcmVersionedAssetId, XcmVersionedLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||
@@ -474,6 +474,31 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
delegatedStaking: {
|
||||
/**
|
||||
* Map of `Agent` to their `Ledger`.
|
||||
**/
|
||||
agents: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletDelegatedStakingAgentLedger>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForAgents: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForDelegators: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Map of Delegators to their `Delegation`.
|
||||
*
|
||||
* Implementation note: We are not using a double map with `delegator` and `agent` account
|
||||
* as keys since we want to restrict delegators to delegate only to one account at a time.
|
||||
**/
|
||||
delegators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletDelegatedStakingDelegation>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
dmp: {
|
||||
/**
|
||||
* The factor to multiply the base delivery fee by.
|
||||
@@ -1130,17 +1155,17 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Priority queue for all orders which don't yet (or not any more) have any core affinity.
|
||||
**/
|
||||
freeEntries: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
freeEntries: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotRuntimeParachainsOnDemandTypesEnqueuedOrder>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Maps a `ParaId` to `CoreIndex` and keeps track of how many assignments the scheduler has in
|
||||
* it's lookahead. Keeping track of this affinity prevents parallel execution of the same
|
||||
* `ParaId` on two or more `CoreIndex`es.
|
||||
**/
|
||||
paraIdAffinity: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
paraIdAffinity: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsOnDemandTypesCoreAffinityCount>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Overall status of queue (both free + affinity entries)
|
||||
**/
|
||||
queueStatus: AugmentedQuery<ApiType, () => Observable<PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
queueStatus: AugmentedQuery<ApiType, () => Observable<PolkadotRuntimeParachainsOnDemandTypesQueueStatusType>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Keeps track of accumulated revenue from on demand order sales.
|
||||
**/
|
||||
@@ -1177,7 +1202,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Scraped on chain data for extracting resolved disputes as well as backing votes.
|
||||
**/
|
||||
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV7ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV8ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1187,7 +1212,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Stored parameters.
|
||||
**/
|
||||
parameters: AugmentedQuery<ApiType, (arg: StagingKusamaRuntimeRuntimeParametersKey | { Inflation: any } | string | Uint8Array) => Observable<Option<StagingKusamaRuntimeRuntimeParametersValue>>, [StagingKusamaRuntimeRuntimeParametersKey]> & QueryableStorageEntry<ApiType, [StagingKusamaRuntimeRuntimeParametersKey]>;
|
||||
parameters: AugmentedQuery<ApiType, (arg: StagingKusamaRuntimeRuntimeParametersKey | { Inflation: any } | { Treasury: any } | string | Uint8Array) => Observable<Option<StagingKusamaRuntimeRuntimeParametersValue>>, [StagingKusamaRuntimeRuntimeParametersKey]> & QueryableStorageEntry<ApiType, [StagingKusamaRuntimeRuntimeParametersKey]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1325,7 +1350,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||
* the format will require migration of parachains.
|
||||
**/
|
||||
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* This is used by the relay-chain to communicate that there are restrictions for performing
|
||||
* an upgrade for this parachain.
|
||||
@@ -1337,7 +1362,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||
* the format will require migration of parachains.
|
||||
**/
|
||||
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1393,7 +1418,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* All ongoing or concluded disputes for the last several sessions.
|
||||
**/
|
||||
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV7DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV8DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
/**
|
||||
* Whether the chain is frozen. Starts as `None`. When this is `Some`,
|
||||
* the chain will not accept any new parachain blocks for backing or inclusion,
|
||||
@@ -1426,7 +1451,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
|
||||
* When in doubt, use `Sessions` API instead.
|
||||
**/
|
||||
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV7AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV8AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The earliest session for which previous session info is stored.
|
||||
**/
|
||||
@@ -1434,13 +1459,13 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Executor parameter set for a given session index
|
||||
**/
|
||||
sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7ExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8ExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Session information in a rolling window.
|
||||
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
||||
* Does not have any entries before the session index in the first session change notification.
|
||||
**/
|
||||
sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1456,7 +1481,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* The parachain attestation keys of the validators actively participating in parachain
|
||||
* consensus. This should be the same length as `ActiveValidatorIndices`.
|
||||
**/
|
||||
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV7ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV8ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* All allowed relay-parents.
|
||||
**/
|
||||
@@ -1474,7 +1499,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Validators pending dispute slashes.
|
||||
**/
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV7SlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV8SlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
/**
|
||||
* `ValidatorSetCount` per session.
|
||||
**/
|
||||
|
||||
@@ -13,7 +13,7 @@ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { ParaId, ValidationCodeHash } from '@polkadot/types/interfaces/parachains';
|
||||
import type { AccountId32, H256, RuntimeCall, Slot } from '@polkadot/types/interfaces/runtime';
|
||||
import type { PalletTransactionPaymentFeeDetails, PalletTransactionPaymentRuntimeDispatchInfo, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotPrimitivesV7ApprovalVotingParams, PolkadotPrimitivesV7AsyncBackingAsyncBackingParams, PolkadotPrimitivesV7AsyncBackingBackingState, PolkadotPrimitivesV7CandidateCommitments, PolkadotPrimitivesV7CandidateEvent, PolkadotPrimitivesV7CommittedCandidateReceipt, PolkadotPrimitivesV7CoreState, PolkadotPrimitivesV7DisputeState, PolkadotPrimitivesV7ExecutorParams, PolkadotPrimitivesV7GroupRotationInfo, PolkadotPrimitivesV7OccupiedCoreAssumption, PolkadotPrimitivesV7PersistedValidationData, PolkadotPrimitivesV7PvfCheckStatement, PolkadotPrimitivesV7ScrapedOnChainVotes, PolkadotPrimitivesV7SessionInfo, PolkadotPrimitivesV7SlashingDisputeProof, PolkadotPrimitivesV7SlashingPendingSlashes, PolkadotPrimitivesV7ValidatorAppPublic, PolkadotPrimitivesV7ValidatorAppSignature, RelayCommonApisInflationInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeConfiguration, SpConsensusBabeEpoch, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusBeefyValidatorSet, SpConsensusGrandpaAppPublic, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpCoreCryptoKeyTypeId, SpInherentsCheckInherentsResult, SpInherentsInherentData, SpMmrPrimitivesError, SpMmrPrimitivesLeafProof, SpRuntimeBlock, SpRuntimeDispatchError, SpRuntimeExtrinsicInclusionMode, SpRuntimeHeader, SpRuntimeTransactionValidityTransactionSource, SpRuntimeTransactionValidityTransactionValidityError, SpRuntimeTransactionValidityValidTransaction, SpVersionRuntimeVersion, SpWeightsWeightV2Weight, StagingKusamaRuntimeOriginCaller, XcmRuntimeApisConversionsError, XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError, XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisFeesError, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { PalletTransactionPaymentFeeDetails, PalletTransactionPaymentRuntimeDispatchInfo, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotPrimitivesV8ApprovalVotingParams, PolkadotPrimitivesV8AsyncBackingAsyncBackingParams, PolkadotPrimitivesV8AsyncBackingBackingState, PolkadotPrimitivesV8CandidateCommitments, PolkadotPrimitivesV8CandidateEvent, PolkadotPrimitivesV8CommittedCandidateReceipt, PolkadotPrimitivesV8CoreState, PolkadotPrimitivesV8DisputeState, PolkadotPrimitivesV8ExecutorParams, PolkadotPrimitivesV8GroupRotationInfo, PolkadotPrimitivesV8OccupiedCoreAssumption, PolkadotPrimitivesV8PersistedValidationData, PolkadotPrimitivesV8PvfCheckStatement, PolkadotPrimitivesV8ScrapedOnChainVotes, PolkadotPrimitivesV8SessionInfo, PolkadotPrimitivesV8SlashingDisputeProof, PolkadotPrimitivesV8SlashingPendingSlashes, PolkadotPrimitivesV8ValidatorAppPublic, PolkadotPrimitivesV8ValidatorAppSignature, RelayCommonApisInflationInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeConfiguration, SpConsensusBabeEpoch, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyForkVotingProofOpaqueValue, SpConsensusBeefyFutureBlockVotingProof, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusBeefyValidatorSet, SpConsensusGrandpaAppPublic, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpCoreCryptoKeyTypeId, SpInherentsCheckInherentsResult, SpInherentsInherentData, SpMmrPrimitivesError, SpMmrPrimitivesLeafProof, SpRuntimeBlock, SpRuntimeDispatchError, SpRuntimeExtrinsicInclusionMode, SpRuntimeHeader, SpRuntimeTransactionValidityTransactionSource, SpRuntimeTransactionValidityTransactionValidityError, SpRuntimeTransactionValidityValidTransaction, SpVersionRuntimeVersion, SpWeightsWeightV2Weight, StagingKusamaRuntimeOriginCaller, XcmRuntimeApisConversionsError, XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError, XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisFeesError, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
||||
@@ -80,14 +80,26 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
* Return the block number where BEEFY consensus is enabled/started
|
||||
**/
|
||||
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<u32>>>;
|
||||
/**
|
||||
* Generates a proof that the `prev_block_number` is part of the canonical chain at, `best_known_block_number`.
|
||||
**/
|
||||
generateAncestryProof: AugmentedCall<ApiType, (prev_block_number: u32 | AnyNumber | Uint8Array, best_known_block_number: Option<u32> | null | Uint8Array | u32 | AnyNumber) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the, given set. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `set_id` as parameter the current, implementations ignores this parameter and instead relies on this, method being called at the correct block height, i.e. any point at, which the given set id is live on-chain. Future implementations will, instead use indexed data through an offchain worker, not requiring, older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (set_id: u64 | AnyNumber | Uint8Array, authority_id: SpConsensusBeefyEcdsaCryptoPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation. The caller, must provide the equivocation proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
* Submits an unsigned extrinsic to report a double voting equivocation. The caller, must provide the double voting proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
submitReportDoubleVotingUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report a fork voting equivocation. The caller, must provide the fork voting proof (the ancestry proof should be obtained using, `generate_ancestry_proof`) and a key ownership proof (should be obtained using, `generate_key_ownership_proof`). The extrinsic will be unsigned and should only, be accepted for local authorship (not to be broadcast to the network). This method, returns `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportForkVotingUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyForkVotingProofOpaqueValue | { vote?: any; ancestryProof?: any; header?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report a future block voting equivocation. The caller, must provide the future block voting proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`)., The extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportFutureBlockVotingUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyFutureBlockVotingProof | { vote?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Return the current active BEEFY validator set
|
||||
**/
|
||||
@@ -176,7 +188,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
buildState: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<Null, Text>>>;
|
||||
/**
|
||||
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by, `id`.,, If `id` is `None` the function returns JSON blob representation of the default, `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default, `RuntimeGenesisConfig`.,, Otherwise function returns a JSON representation of the built-in, named, `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not, exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of, (potentially nested) key-value pairs that are intended for customizing the default, runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation, of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can, be used in `build_state` method.
|
||||
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by, `id`.,, If `id` is `None` the function returns JSON blob representation of the default, `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default, `RuntimeGenesisConfig`.,, Otherwise function returns a JSON representation of the built-in, named, `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not, exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of, (potentially nested) key-value pairs that are intended for customizing the default, runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation, of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can, be used in `build_state` method.
|
||||
**/
|
||||
getPreset: AugmentedCall<ApiType, (id: Option<Text> | null | Uint8Array | Text | string) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
@@ -290,9 +302,13 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
memberNeedsDelegateMigration: AugmentedCall<ApiType, (member: AccountId32 | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Returns the pending slash for a given pool member.
|
||||
* Returns the pending slash for a given pool member.,, If pending slash of the member exceeds `ExistentialDeposit`, it can be reported on, chain.
|
||||
**/
|
||||
memberPendingSlash: AugmentedCall<ApiType, (member: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the total contribution of a pool member including any balance that is unbonding.
|
||||
**/
|
||||
memberTotalBalance: AugmentedCall<ApiType, (who: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the pending rewards for the member that the AccountId was given for.
|
||||
**/
|
||||
@@ -301,6 +317,10 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
* Returns the equivalent balance of `points` for a given pool.
|
||||
**/
|
||||
pointsToBalance: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array, points: u128 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Total balance contributed to the pool.
|
||||
**/
|
||||
poolBalance: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns true if the pool with `pool_id` needs migration.,, This can happen when the `pallet-nomination-pools` has switched to using strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool, still has funds that were staked using the older strategy, [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use, [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake), to migrate the pool.
|
||||
**/
|
||||
@@ -330,35 +350,35 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Approval voting configuration parameters
|
||||
**/
|
||||
approvalVotingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV7ApprovalVotingParams>>;
|
||||
approvalVotingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV8ApprovalVotingParams>>;
|
||||
/**
|
||||
* Returns the persisted validation data for the given `ParaId` along with the corresponding, validation code hash. Instead of accepting assumption about the para, matches the validation, data hash against an expected one and yields `None` if they're not equal.
|
||||
**/
|
||||
assumedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, expected_persisted_validation_data_hash: H256 | string | Uint8Array) => Observable<Option<ITuple<[PolkadotPrimitivesV7PersistedValidationData, H256]>>>>;
|
||||
assumedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, expected_persisted_validation_data_hash: H256 | string | Uint8Array) => Observable<Option<ITuple<[PolkadotPrimitivesV8PersistedValidationData, H256]>>>>;
|
||||
/**
|
||||
* Returns candidate's acceptance limitations for asynchronous backing for a relay parent.
|
||||
**/
|
||||
asyncBackingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV7AsyncBackingAsyncBackingParams>>;
|
||||
asyncBackingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV8AsyncBackingAsyncBackingParams>>;
|
||||
/**
|
||||
* Yields information on all availability cores as relevant to the child block., Cores are either free or occupied. Free cores can have paras assigned to them.
|
||||
**/
|
||||
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7CoreState>>>;
|
||||
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV8CoreState>>>;
|
||||
/**
|
||||
* Get a vector of events concerning candidates that occurred within a block.
|
||||
**/
|
||||
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7CandidateEvent>>>;
|
||||
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV8CandidateEvent>>>;
|
||||
/**
|
||||
* Get the receipt of a candidate pending availability. This returns `Some` for any paras, assigned to occupied cores in `availability_cores` and `None` otherwise.
|
||||
**/
|
||||
candidatePendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7CommittedCandidateReceipt>>>;
|
||||
candidatePendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8CommittedCandidateReceipt>>>;
|
||||
/**
|
||||
* Elastic scaling support
|
||||
**/
|
||||
candidatesPendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Vec<PolkadotPrimitivesV7CommittedCandidateReceipt>>>;
|
||||
candidatesPendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Vec<PolkadotPrimitivesV8CommittedCandidateReceipt>>>;
|
||||
/**
|
||||
* Checks if the given validation outputs pass the acceptance criteria.
|
||||
**/
|
||||
checkValidationOutputs: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, outputs: PolkadotPrimitivesV7CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
checkValidationOutputs: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, outputs: PolkadotPrimitivesV8CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Claim queue
|
||||
**/
|
||||
@@ -370,7 +390,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Returns all onchain disputes.
|
||||
**/
|
||||
disputes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV7DisputeState]>>>>;
|
||||
disputes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV8DisputeState]>>>>;
|
||||
/**
|
||||
* Get all the pending inbound messages in the downward message queue for a para.
|
||||
**/
|
||||
@@ -382,7 +402,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Returns a merkle proof of a validator session key., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
keyOwnershipProof: AugmentedCall<ApiType, (validator_id: PolkadotPrimitivesV7ValidatorAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
keyOwnershipProof: AugmentedCall<ApiType, (validator_id: PolkadotPrimitivesV8ValidatorAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the minimum number of backing votes for a parachain candidate., This is a staging method! Do not use on production runtimes!
|
||||
**/
|
||||
@@ -394,15 +414,15 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
|
||||
**/
|
||||
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<PolkadotPrimitivesV7ScrapedOnChainVotes>>>;
|
||||
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<PolkadotPrimitivesV8ScrapedOnChainVotes>>>;
|
||||
/**
|
||||
* Returns the state of parachain backing for a given para.
|
||||
**/
|
||||
paraBackingState: AugmentedCall<ApiType, (_: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7AsyncBackingBackingState>>>;
|
||||
paraBackingState: AugmentedCall<ApiType, (_: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8AsyncBackingBackingState>>>;
|
||||
/**
|
||||
* Yields the persisted validation data for the given `ParaId` along with an assumption that, should be used if the para currently occupies a core.,, Returns `None` if either the para is not registered or the assumption is `Freed`, and the para already occupies a core.
|
||||
**/
|
||||
persistedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PolkadotPrimitivesV7PersistedValidationData>>>;
|
||||
persistedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV8OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PolkadotPrimitivesV8PersistedValidationData>>>;
|
||||
/**
|
||||
* Returns code hashes of PVFs that require pre-checking by validators in the active set.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
@@ -410,7 +430,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Returns execution parameters for the session.
|
||||
**/
|
||||
sessionExecutorParams: AugmentedCall<ApiType, (session_index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7ExecutorParams>>>;
|
||||
sessionExecutorParams: AugmentedCall<ApiType, (session_index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8ExecutorParams>>>;
|
||||
/**
|
||||
* Returns the session index expected at a child of the block.,, This can be used to instantiate a `SigningContext`.
|
||||
**/
|
||||
@@ -418,23 +438,23 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Get the session info for the given session, if stored.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
sessionInfo: AugmentedCall<ApiType, (index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7SessionInfo>>>;
|
||||
sessionInfo: AugmentedCall<ApiType, (index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8SessionInfo>>>;
|
||||
/**
|
||||
* Submits a PVF pre-checking statement into the transaction pool.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PolkadotPrimitivesV7PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV7ValidatorAppSignature | string | Uint8Array) => Observable<Null>>;
|
||||
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PolkadotPrimitivesV8PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV8ValidatorAppSignature | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Submit an unsigned extrinsic to slash validators who lost a dispute about, a candidate of a past session., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
submitReportDisputeLost: AugmentedCall<ApiType, (dispute_proof: PolkadotPrimitivesV7SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, key_ownership_proof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
submitReportDisputeLost: AugmentedCall<ApiType, (dispute_proof: PolkadotPrimitivesV8SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, key_ownership_proof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Returns a list of validators that lost a past session dispute and need to be slashed., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV7SlashingPendingSlashes]>>>>;
|
||||
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV8SlashingPendingSlashes]>>>>;
|
||||
/**
|
||||
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.,, Returns `None` if either the para is not registered or the assumption is `Freed`, and the para already occupies a core.
|
||||
**/
|
||||
validationCode: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
validationCode: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV8OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the validation code from its hash.
|
||||
**/
|
||||
@@ -442,15 +462,15 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
validationCodeHash: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<H256>>>;
|
||||
validationCodeHash: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV8OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<H256>>>;
|
||||
/**
|
||||
* Returns the validator groups and rotation info localized based on the hypothetical child, of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`, should be the successor of the number of the block.
|
||||
**/
|
||||
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<u32>>, PolkadotPrimitivesV7GroupRotationInfo]>>>;
|
||||
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<u32>>, PolkadotPrimitivesV8GroupRotationInfo]>>>;
|
||||
/**
|
||||
* Get the current validators.
|
||||
**/
|
||||
validators: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7ValidatorAppPublic>>>;
|
||||
validators: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV8ValidatorAppPublic>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
|
||||
@@ -10,7 +10,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, PalletBalancesAdjustmentDirection, PalletBrokerCoretimeInterfaceCoreAssignment, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV7ApprovalVotingParams, PolkadotPrimitivesV7AsyncBackingAsyncBackingParams, PolkadotPrimitivesV7ExecutorParams, PolkadotPrimitivesV7InherentData, PolkadotPrimitivesV7PvfCheckStatement, PolkadotPrimitivesV7SlashingDisputeProof, PolkadotPrimitivesV7ValidatorAppSignature, PolkadotPrimitivesVstagingSchedulerParams, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyDoubleVotingProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, StagingKusamaRuntimeOriginCaller, StagingKusamaRuntimeProxyType, StagingKusamaRuntimeRuntimeParameters, StagingKusamaRuntimeSessionKeys, StagingXcmExecutorAssetTransferTransferType, StagingXcmV4Location, XcmV3WeightLimit, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, PalletBalancesAdjustmentDirection, PalletBrokerCoretimeInterfaceCoreAssignment, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV8ApprovalVotingParams, PolkadotPrimitivesV8AsyncBackingAsyncBackingParams, PolkadotPrimitivesV8ExecutorParams, PolkadotPrimitivesV8InherentData, PolkadotPrimitivesV8PvfCheckStatement, PolkadotPrimitivesV8SchedulerParams, PolkadotPrimitivesV8SlashingDisputeProof, PolkadotPrimitivesV8ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyForkVotingProofAncestryProof, SpConsensusBeefyFutureBlockVotingProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, StagingKusamaRuntimeOriginCaller, StagingKusamaRuntimeProxyType, StagingKusamaRuntimeRuntimeParameters, StagingKusamaRuntimeSessionKeys, StagingXcmExecutorAssetTransferTransferType, StagingXcmV4Location, XcmV3WeightLimit, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
||||
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
||||
@@ -211,7 +211,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* against the extracted offender. If both are valid, the offence
|
||||
* will be reported.
|
||||
**/
|
||||
reportEquivocation: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
|
||||
reportDoubleVoting: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Report voter equivocation/misbehavior. This method will verify the
|
||||
* equivocation proof and validate the given key ownership proof
|
||||
@@ -223,7 +223,41 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* if the block author is defined it will be defined as the equivocation
|
||||
* reporter.
|
||||
**/
|
||||
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
|
||||
reportDoubleVotingUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Report fork voting equivocation. This method will verify the equivocation proof
|
||||
* and validate the given key ownership proof against the extracted offender.
|
||||
* If both are valid, the offence will be reported.
|
||||
**/
|
||||
reportForkVoting: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyForkVotingProofAncestryProof | { vote?: any; ancestryProof?: any; header?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyForkVotingProofAncestryProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Report fork voting equivocation. This method will verify the equivocation proof
|
||||
* and validate the given key ownership proof against the extracted offender.
|
||||
* If both are valid, the offence will be reported.
|
||||
*
|
||||
* This extrinsic must be called unsigned and it is expected that only
|
||||
* block authors will call it (validated in `ValidateUnsigned`), as such
|
||||
* if the block author is defined it will be defined as the equivocation
|
||||
* reporter.
|
||||
**/
|
||||
reportForkVotingUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyForkVotingProofAncestryProof | { vote?: any; ancestryProof?: any; header?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyForkVotingProofAncestryProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Report future block voting equivocation. This method will verify the equivocation proof
|
||||
* and validate the given key ownership proof against the extracted offender.
|
||||
* If both are valid, the offence will be reported.
|
||||
**/
|
||||
reportFutureBlockVoting: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyFutureBlockVotingProof | { vote?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyFutureBlockVotingProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Report future block voting equivocation. This method will verify the equivocation proof
|
||||
* and validate the given key ownership proof against the extracted offender.
|
||||
* If both are valid, the offence will be reported.
|
||||
*
|
||||
* This extrinsic must be called unsigned and it is expected that only
|
||||
* block authors will call it (validated in `ValidateUnsigned`), as such
|
||||
* if the block author is defined it will be defined as the equivocation
|
||||
* reporter.
|
||||
**/
|
||||
reportFutureBlockVotingUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyFutureBlockVotingProof | { vote?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyFutureBlockVotingProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Reset BEEFY consensus by setting a new BEEFY genesis at `delay_in_blocks` blocks in the
|
||||
* future.
|
||||
@@ -631,11 +665,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Set approval-voting-params.
|
||||
**/
|
||||
setApprovalVotingParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV7ApprovalVotingParams | { maxApprovalCoalesceCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7ApprovalVotingParams]>;
|
||||
setApprovalVotingParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV8ApprovalVotingParams | { maxApprovalCoalesceCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8ApprovalVotingParams]>;
|
||||
/**
|
||||
* Set the asynchronous backing parameters.
|
||||
**/
|
||||
setAsyncBackingParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV7AsyncBackingAsyncBackingParams | { maxCandidateDepth?: any; allowedAncestryLen?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7AsyncBackingAsyncBackingParams]>;
|
||||
setAsyncBackingParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV8AsyncBackingAsyncBackingParams | { maxCandidateDepth?: any; allowedAncestryLen?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8AsyncBackingAsyncBackingParams]>;
|
||||
/**
|
||||
* Setting this to true will disable consistency checks for the configuration setters.
|
||||
* Use with caution.
|
||||
@@ -663,7 +697,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Set PVF executor parameters.
|
||||
**/
|
||||
setExecutorParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV7ExecutorParams) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7ExecutorParams]>;
|
||||
setExecutorParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV8ExecutorParams) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8ExecutorParams]>;
|
||||
/**
|
||||
* Set the parachain validator-group rotation frequency
|
||||
**/
|
||||
@@ -813,7 +847,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Set scheduler-params.
|
||||
**/
|
||||
setSchedulerParams: AugmentedSubmittable<(updated: PolkadotPrimitivesVstagingSchedulerParams | { groupRotationFrequency?: any; parasAvailabilityPeriod?: any; maxValidatorsPerCore?: any; lookahead?: any; numCores?: any; maxAvailabilityTimeouts?: any; onDemandQueueMaxSize?: any; onDemandTargetQueueUtilization?: any; onDemandFeeVariability?: any; onDemandBaseFee?: any; ttl?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesVstagingSchedulerParams]>;
|
||||
setSchedulerParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV8SchedulerParams | { groupRotationFrequency?: any; parasAvailabilityPeriod?: any; maxValidatorsPerCore?: any; lookahead?: any; numCores?: any; maxAvailabilityTimeouts?: any; onDemandQueueMaxSize?: any; onDemandTargetQueueUtilization?: any; onDemandFeeVariability?: any; onDemandBaseFee?: any; ttl?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8SchedulerParams]>;
|
||||
/**
|
||||
* Set the scheduling lookahead, in expected number of blocks at peak throughput.
|
||||
**/
|
||||
@@ -1949,8 +1983,10 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:
|
||||
* [`adapter::StakeStrategyType::Delegate`].
|
||||
*
|
||||
* This call can be dispatched permissionlessly (i.e. by any account). If the member has
|
||||
* slash to be applied, caller may be rewarded with the part of the slash.
|
||||
* The pending slash amount of the member must be equal or more than `ExistentialDeposit`.
|
||||
* This call can be dispatched permissionlessly (i.e. by any account). If the execution
|
||||
* is successful, fee is refunded and caller may be rewarded with a part of the slash
|
||||
* based on the [`crate::pallet::Config::StakeAdapter`] configuration.
|
||||
**/
|
||||
applySlash: AugmentedSubmittable<(memberAccount: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||
/**
|
||||
@@ -2050,8 +2086,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
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.
|
||||
* Stake funds with a pool. The amount to bond is transferred from the member to the pool
|
||||
* account and immediately increases the pools bond.
|
||||
*
|
||||
* The method of transferring the amount to the pool account is determined by
|
||||
* [`adapter::StakeStrategyType`]. If the pool is configured to use
|
||||
* [`adapter::StakeStrategyType::Delegate`], the funds remain in the account of
|
||||
* the `origin`, while the pool gains the right to use these funds for staking.
|
||||
*
|
||||
* # Note
|
||||
*
|
||||
@@ -2310,7 +2351,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Enter the paras inherent. This will process bitfields and backed candidates.
|
||||
**/
|
||||
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV7InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7InherentData]>;
|
||||
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV8InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8InherentData]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -2323,7 +2364,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be
|
||||
* deleted by setting them to `None`.
|
||||
**/
|
||||
setParameter: AugmentedSubmittable<(keyValue: StagingKusamaRuntimeRuntimeParameters | { Inflation: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [StagingKusamaRuntimeRuntimeParameters]>;
|
||||
setParameter: AugmentedSubmittable<(keyValue: StagingKusamaRuntimeRuntimeParameters | { Inflation: any } | { Treasury: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [StagingKusamaRuntimeRuntimeParameters]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -2377,7 +2418,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and
|
||||
* enacts the results if that was the last vote before achieving the supermajority.
|
||||
**/
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV7PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV7ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7PvfCheckStatement, PolkadotPrimitivesV7ValidatorAppSignature]>;
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV8PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV8ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8PvfCheckStatement, PolkadotPrimitivesV8ValidatorAppSignature]>;
|
||||
/**
|
||||
* Remove the validation code from the storage iff the reference count is 0.
|
||||
*
|
||||
@@ -2405,7 +2446,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
parasSlashing: {
|
||||
reportDisputeLostUnsigned: AugmentedSubmittable<(disputeProof: PolkadotPrimitivesV7SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7SlashingDisputeProof, SpSessionMembershipProof]>;
|
||||
reportDisputeLostUnsigned: AugmentedSubmittable<(disputeProof: PolkadotPrimitivesV8SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8SlashingDisputeProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -2464,7 +2505,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - `delay`: The announcement period required of the initial proxy. Will generally be
|
||||
* zero.
|
||||
**/
|
||||
addProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, StagingKusamaRuntimeProxyType, u32]>;
|
||||
addProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | 'ParaRegistration' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, StagingKusamaRuntimeProxyType, u32]>;
|
||||
/**
|
||||
* Publish the hash of a proxy-call that will be made in the future.
|
||||
*
|
||||
@@ -2503,7 +2544,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Fails if there are insufficient funds to pay for deposit.
|
||||
**/
|
||||
createPure: AugmentedSubmittable<(proxyType: StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [StagingKusamaRuntimeProxyType, u32, u16]>;
|
||||
createPure: AugmentedSubmittable<(proxyType: StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | 'ParaRegistration' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [StagingKusamaRuntimeProxyType, u32, u16]>;
|
||||
/**
|
||||
* Removes a previously spawned pure proxy.
|
||||
*
|
||||
@@ -2522,7 +2563,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Fails with `NoPermission` in case the caller is not a previously created pure
|
||||
* account whose `pure` call has corresponding parameters.
|
||||
**/
|
||||
killPure: AugmentedSubmittable<(spawner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, StagingKusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
||||
killPure: AugmentedSubmittable<(spawner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | 'ParaRegistration' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, StagingKusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Dispatch the given `call` from an account that the sender is authorised for through
|
||||
* `add_proxy`.
|
||||
@@ -2534,7 +2575,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||
* - `call`: The call to be made by the `real` account.
|
||||
**/
|
||||
proxy: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<StagingKusamaRuntimeProxyType> | null | Uint8Array | StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Option<StagingKusamaRuntimeProxyType>, Call]>;
|
||||
proxy: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<StagingKusamaRuntimeProxyType> | null | Uint8Array | StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | 'ParaRegistration' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Option<StagingKusamaRuntimeProxyType>, Call]>;
|
||||
/**
|
||||
* Dispatch the given `call` from an account that the sender is authorized for through
|
||||
* `add_proxy`.
|
||||
@@ -2548,7 +2589,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||
* - `call`: The call to be made by the `real` account.
|
||||
**/
|
||||
proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<StagingKusamaRuntimeProxyType> | null | Uint8Array | StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<StagingKusamaRuntimeProxyType>, Call]>;
|
||||
proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<StagingKusamaRuntimeProxyType> | null | Uint8Array | StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | 'ParaRegistration' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<StagingKusamaRuntimeProxyType>, Call]>;
|
||||
/**
|
||||
* Remove the given announcement of a delegate.
|
||||
*
|
||||
@@ -2593,7 +2634,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - `proxy`: The account that the `caller` would like to remove as a proxy.
|
||||
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
||||
**/
|
||||
removeProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, StagingKusamaRuntimeProxyType, u32]>;
|
||||
removeProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: StagingKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'Society' | 'NominationPools' | 'Spokesperson' | 'ParaRegistration' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, StagingKusamaRuntimeProxyType, u32]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '15.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '15.9.2' };
|
||||
|
||||
@@ -240,6 +240,20 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
delegatedStaking: {
|
||||
/**
|
||||
* Injected identifier for the pallet.
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Fraction of the slash that is rewarded to the caller of pending slash to the agent.
|
||||
**/
|
||||
slashRewardFraction: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
|
||||
@@ -149,9 +149,21 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
InvalidConfiguration: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An equivocation proof provided as part of an equivocation report is invalid.
|
||||
* A double voting proof provided as part of an equivocation report is invalid.
|
||||
**/
|
||||
InvalidEquivocationProof: AugmentedError<ApiType>;
|
||||
InvalidDoubleVotingProof: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The session of the equivocation proof is invalid
|
||||
**/
|
||||
InvalidEquivocationProofSession: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A fork voting proof provided as part of an equivocation report is invalid.
|
||||
**/
|
||||
InvalidForkVotingProof: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A future block voting proof provided as part of an equivocation report is invalid.
|
||||
**/
|
||||
InvalidFutureBlockVotingProof: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A key ownership proof provided as part of an equivocation report is invalid.
|
||||
**/
|
||||
@@ -472,6 +484,64 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
delegatedStaking: {
|
||||
/**
|
||||
* An existing staker cannot perform this action.
|
||||
**/
|
||||
AlreadyStaking: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Some corruption in internal state.
|
||||
**/
|
||||
BadState: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Delegation conditions are not met.
|
||||
*
|
||||
* Possible issues are
|
||||
* 1) Cannot delegate to self,
|
||||
* 2) Cannot delegate to multiple delegates.
|
||||
**/
|
||||
InvalidDelegation: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Reward Destination cannot be same as `Agent` account.
|
||||
**/
|
||||
InvalidRewardDestination: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Not an existing `Agent` account.
|
||||
**/
|
||||
NotAgent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The account cannot perform this operation.
|
||||
**/
|
||||
NotAllowed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Not a Delegator account.
|
||||
**/
|
||||
NotDelegator: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The account does not have enough funds to perform the operation.
|
||||
**/
|
||||
NotEnoughFunds: AugmentedError<ApiType>;
|
||||
/**
|
||||
* `Agent` has no pending slash to be applied.
|
||||
**/
|
||||
NothingToSlash: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Operation not supported by this pallet.
|
||||
**/
|
||||
NotSupported: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Unapplied pending slash restricts operation on `Agent`.
|
||||
**/
|
||||
UnappliedSlash: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Failed to withdraw amount from Core Staking.
|
||||
**/
|
||||
WithdrawFailed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* Some bound not met
|
||||
@@ -977,6 +1047,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* A reward pool does not exist. In all cases this is a system logic error.
|
||||
**/
|
||||
RewardPoolNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The slash amount is too low to be applied.
|
||||
**/
|
||||
SlashTooLow: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A sub pool does not exist.
|
||||
**/
|
||||
@@ -1052,10 +1126,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Output code is too large
|
||||
**/
|
||||
NewCodeTooLarge: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Collator did not sign PoV.
|
||||
**/
|
||||
NotCollatorSigned: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The `para_head` hash in the candidate descriptor doesn't match the hash of the actual
|
||||
* para head in the commitments.
|
||||
@@ -1246,10 +1316,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Preimage has already been noted on-chain.
|
||||
**/
|
||||
AlreadyNoted: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No ticket with a cost was returned by [`Config::Consideration`] to store the preimage.
|
||||
**/
|
||||
NoCost: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The user is not authorized to perform this action.
|
||||
**/
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, H256, Perbill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsPoolState, PalletStakingForcing, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV7CandidateReceipt, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeProxyType, PolkadotRuntimeRuntimeParametersKey, PolkadotRuntimeRuntimeParametersValue, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, StagingXcmV4AssetAssets, StagingXcmV4Location, StagingXcmV4Response, StagingXcmV4TraitsOutcome, StagingXcmV4Xcm, XcmV3TraitsError, XcmVersionedAssets, XcmVersionedLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsPoolState, PalletStakingForcing, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV8CandidateReceipt, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeProxyType, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, StagingXcmV4AssetAssets, StagingXcmV4Location, StagingXcmV4Response, StagingXcmV4TraitsOutcome, StagingXcmV4Xcm, XcmV3TraitsError, XcmVersionedAssets, XcmVersionedLocation } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||
|
||||
@@ -250,6 +250,14 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An \[account\] has cancelled a previous delegation operation.
|
||||
**/
|
||||
Undelegated: AugmentedEvent<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* An account that has voted
|
||||
**/
|
||||
Voted: AugmentedEvent<ApiType, [who: AccountId32, vote: PalletConvictionVotingVoteAccountVote], { who: AccountId32, vote: PalletConvictionVotingVoteAccountVote }>;
|
||||
/**
|
||||
* A vote that been removed
|
||||
**/
|
||||
VoteRemoved: AugmentedEvent<ApiType, [who: AccountId32, vote: PalletConvictionVotingVoteAccountVote], { who: AccountId32, vote: PalletConvictionVotingVoteAccountVote }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -316,6 +324,28 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
delegatedStaking: {
|
||||
/**
|
||||
* Funds delegated by a delegator.
|
||||
**/
|
||||
Delegated: AugmentedEvent<ApiType, [agent: AccountId32, delegator: AccountId32, amount: u128], { agent: AccountId32, delegator: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Unclaimed delegation funds migrated to delegator.
|
||||
**/
|
||||
MigratedDelegation: AugmentedEvent<ApiType, [agent: AccountId32, delegator: AccountId32, amount: u128], { agent: AccountId32, delegator: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Funds released to a delegator.
|
||||
**/
|
||||
Released: AugmentedEvent<ApiType, [agent: AccountId32, delegator: AccountId32, amount: u128], { agent: AccountId32, delegator: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Funds slashed from a delegator.
|
||||
**/
|
||||
Slashed: AugmentedEvent<ApiType, [agent: AccountId32, delegator: AccountId32, amount: u128], { agent: AccountId32, delegator: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* An election failed.
|
||||
@@ -514,8 +544,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A member has been removed from a pool.
|
||||
*
|
||||
* The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked).
|
||||
* Any funds that are still delegated (i.e. dangling delegation) are released and are
|
||||
* represented by `released_balance`.
|
||||
**/
|
||||
MemberRemoved: AugmentedEvent<ApiType, [poolId: u32, member: AccountId32], { poolId: u32, member: AccountId32 }>;
|
||||
MemberRemoved: AugmentedEvent<ApiType, [poolId: u32, member: AccountId32, releasedBalance: u128], { poolId: u32, member: AccountId32, releasedBalance: u128 }>;
|
||||
/**
|
||||
* Topped up deficit in frozen ED of the reward pool.
|
||||
**/
|
||||
@@ -623,15 +655,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* A candidate was backed. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV7CandidateReceipt, Bytes, u32, u32]>;
|
||||
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV8CandidateReceipt, Bytes, u32, u32]>;
|
||||
/**
|
||||
* A candidate was included. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV7CandidateReceipt, Bytes, u32, u32]>;
|
||||
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV8CandidateReceipt, Bytes, u32, u32]>;
|
||||
/**
|
||||
* A candidate timed out. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV7CandidateReceipt, Bytes, u32]>;
|
||||
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV8CandidateReceipt, Bytes, u32]>;
|
||||
/**
|
||||
* Some upward messages have been received and will be processed.
|
||||
**/
|
||||
@@ -641,18 +673,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
parameters: {
|
||||
/**
|
||||
* A Parameter was set.
|
||||
*
|
||||
* Is also emitted when the value was not changed.
|
||||
**/
|
||||
Updated: AugmentedEvent<ApiType, [key: PolkadotRuntimeRuntimeParametersKey, oldValue: Option<PolkadotRuntimeRuntimeParametersValue>, newValue: Option<PolkadotRuntimeRuntimeParametersValue>], { key: PolkadotRuntimeRuntimeParametersKey, oldValue: Option<PolkadotRuntimeRuntimeParametersValue>, newValue: Option<PolkadotRuntimeRuntimeParametersValue> }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
paras: {
|
||||
/**
|
||||
* A para has been queued to execute pending actions. `para_id`
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { BTreeMap, BTreeSet, Bytes, Null, Option, U8aFixed, Vec, bool, u128
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { BinaryHeapEnqueuedOrder, FrameSupportDispatchPerDispatchClassWeight, FrameSupportTokensMiscIdAmountRuntimeFreezeReason, FrameSupportTokensMiscIdAmountRuntimeHoldReason, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletReferendaReferendumInfo, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletTreasurySpendStatus, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV7AssignmentAppPublic, PolkadotPrimitivesV7DisputeState, PolkadotPrimitivesV7ExecutorParams, PolkadotPrimitivesV7ScrapedOnChainVotes, PolkadotPrimitivesV7SessionInfo, PolkadotPrimitivesV7SlashingPendingSlashes, PolkadotPrimitivesV7UpgradeGoAhead, PolkadotPrimitivesV7UpgradeRestriction, PolkadotPrimitivesV7ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsAssignerCoretimeCoreDescriptor, PolkadotRuntimeParachainsAssignerCoretimeSchedule, PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount, PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder, PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerPalletCoreOccupied, PolkadotRuntimeParachainsSchedulerPalletParasEntry, PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker, PolkadotRuntimeRuntimeParametersKey, PolkadotRuntimeRuntimeParametersValue, PolkadotRuntimeSessionKeys, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusGrandpaAppPublic, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingExposure, SpStakingExposurePage, SpStakingOffenceOffenceDetails, SpStakingPagedExposureMetadata, SpWeightsWeightV2Weight, StagingXcmV4Instruction, XcmVersionedAssetId, XcmVersionedLocation } from '@polkadot/types/lookup';
|
||||
import type { BinaryHeapEnqueuedOrder, FrameSupportDispatchPerDispatchClassWeight, FrameSupportTokensMiscIdAmountRuntimeFreezeReason, FrameSupportTokensMiscIdAmountRuntimeHoldReason, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletDelegatedStakingAgentLedger, PalletDelegatedStakingDelegation, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletReferendaReferendumInfo, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletTreasurySpendStatus, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV8AssignmentAppPublic, PolkadotPrimitivesV8DisputeState, PolkadotPrimitivesV8ExecutorParams, PolkadotPrimitivesV8ScrapedOnChainVotes, PolkadotPrimitivesV8SessionInfo, PolkadotPrimitivesV8SlashingPendingSlashes, PolkadotPrimitivesV8UpgradeGoAhead, PolkadotPrimitivesV8UpgradeRestriction, PolkadotPrimitivesV8ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsAssignerCoretimeCoreDescriptor, PolkadotRuntimeParachainsAssignerCoretimeSchedule, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsOnDemandTypesCoreAffinityCount, PolkadotRuntimeParachainsOnDemandTypesEnqueuedOrder, PolkadotRuntimeParachainsOnDemandTypesQueueStatusType, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerPalletCoreOccupied, PolkadotRuntimeParachainsSchedulerPalletParasEntry, PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker, PolkadotRuntimeSessionKeys, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusGrandpaAppPublic, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingExposure, SpStakingExposurePage, SpStakingOffenceOffenceDetails, SpStakingPagedExposureMetadata, SpWeightsWeightV2Weight, StagingXcmV4Instruction, XcmVersionedAssetId, XcmVersionedLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||
@@ -468,6 +468,31 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
delegatedStaking: {
|
||||
/**
|
||||
* Map of `Agent` to their `Ledger`.
|
||||
**/
|
||||
agents: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletDelegatedStakingAgentLedger>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForAgents: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForDelegators: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Map of Delegators to their `Delegation`.
|
||||
*
|
||||
* Implementation note: We are not using a double map with `delegator` and `agent` account
|
||||
* as keys since we want to restrict delegators to delegate only to one account at a time.
|
||||
**/
|
||||
delegators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletDelegatedStakingDelegation>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
dmp: {
|
||||
/**
|
||||
* The factor to multiply the base delivery fee by.
|
||||
@@ -970,17 +995,17 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Priority queue for all orders which don't yet (or not any more) have any core affinity.
|
||||
**/
|
||||
freeEntries: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
freeEntries: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotRuntimeParachainsOnDemandTypesEnqueuedOrder>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Maps a `ParaId` to `CoreIndex` and keeps track of how many assignments the scheduler has in
|
||||
* it's lookahead. Keeping track of this affinity prevents parallel execution of the same
|
||||
* `ParaId` on two or more `CoreIndex`es.
|
||||
**/
|
||||
paraIdAffinity: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
paraIdAffinity: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsOnDemandTypesCoreAffinityCount>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Overall status of queue (both free + affinity entries)
|
||||
**/
|
||||
queueStatus: AugmentedQuery<ApiType, () => Observable<PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
queueStatus: AugmentedQuery<ApiType, () => Observable<PolkadotRuntimeParachainsOnDemandTypesQueueStatusType>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Keeps track of accumulated revenue from on demand order sales.
|
||||
**/
|
||||
@@ -1017,17 +1042,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Scraped on chain data for extracting resolved disputes as well as backing votes.
|
||||
**/
|
||||
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV7ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
parameters: {
|
||||
/**
|
||||
* Stored parameters.
|
||||
**/
|
||||
parameters: AugmentedQuery<ApiType, (arg: PolkadotRuntimeRuntimeParametersKey | { Inflation: any } | string | Uint8Array) => Observable<Option<PolkadotRuntimeRuntimeParametersValue>>, [PolkadotRuntimeRuntimeParametersKey]> & QueryableStorageEntry<ApiType, [PolkadotRuntimeRuntimeParametersKey]>;
|
||||
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV8ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1165,7 +1180,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||
* the format will require migration of parachains.
|
||||
**/
|
||||
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* This is used by the relay-chain to communicate that there are restrictions for performing
|
||||
* an upgrade for this parachain.
|
||||
@@ -1177,7 +1192,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||
* the format will require migration of parachains.
|
||||
**/
|
||||
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1233,7 +1248,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* All ongoing or concluded disputes for the last several sessions.
|
||||
**/
|
||||
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV7DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV8DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
/**
|
||||
* Whether the chain is frozen. Starts as `None`. When this is `Some`,
|
||||
* the chain will not accept any new parachain blocks for backing or inclusion,
|
||||
@@ -1266,7 +1281,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
|
||||
* When in doubt, use `Sessions` API instead.
|
||||
**/
|
||||
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV7AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV8AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The earliest session for which previous session info is stored.
|
||||
**/
|
||||
@@ -1274,13 +1289,13 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Executor parameter set for a given session index
|
||||
**/
|
||||
sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7ExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8ExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Session information in a rolling window.
|
||||
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
||||
* Does not have any entries before the session index in the first session change notification.
|
||||
**/
|
||||
sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1296,7 +1311,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* The parachain attestation keys of the validators actively participating in parachain
|
||||
* consensus. This should be the same length as `ActiveValidatorIndices`.
|
||||
**/
|
||||
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV7ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV8ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* All allowed relay-parents.
|
||||
**/
|
||||
@@ -1314,7 +1329,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Validators pending dispute slashes.
|
||||
**/
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV7SlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV8SlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
/**
|
||||
* `ValidatorSetCount` per session.
|
||||
**/
|
||||
|
||||
@@ -13,7 +13,7 @@ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { ParaId, ValidationCodeHash } from '@polkadot/types/interfaces/parachains';
|
||||
import type { AccountId32, H256, RuntimeCall, Slot } from '@polkadot/types/interfaces/runtime';
|
||||
import type { PalletTransactionPaymentFeeDetails, PalletTransactionPaymentRuntimeDispatchInfo, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotPrimitivesV7ApprovalVotingParams, PolkadotPrimitivesV7AsyncBackingAsyncBackingParams, PolkadotPrimitivesV7AsyncBackingBackingState, PolkadotPrimitivesV7CandidateCommitments, PolkadotPrimitivesV7CandidateEvent, PolkadotPrimitivesV7CommittedCandidateReceipt, PolkadotPrimitivesV7CoreState, PolkadotPrimitivesV7DisputeState, PolkadotPrimitivesV7ExecutorParams, PolkadotPrimitivesV7GroupRotationInfo, PolkadotPrimitivesV7OccupiedCoreAssumption, PolkadotPrimitivesV7PersistedValidationData, PolkadotPrimitivesV7PvfCheckStatement, PolkadotPrimitivesV7ScrapedOnChainVotes, PolkadotPrimitivesV7SessionInfo, PolkadotPrimitivesV7SlashingDisputeProof, PolkadotPrimitivesV7SlashingPendingSlashes, PolkadotPrimitivesV7ValidatorAppPublic, PolkadotPrimitivesV7ValidatorAppSignature, PolkadotRuntimeOriginCaller, RelayCommonApisInflationInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeConfiguration, SpConsensusBabeEpoch, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusBeefyValidatorSet, SpConsensusGrandpaAppPublic, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpCoreCryptoKeyTypeId, SpInherentsCheckInherentsResult, SpInherentsInherentData, SpMmrPrimitivesError, SpMmrPrimitivesLeafProof, SpRuntimeBlock, SpRuntimeDispatchError, SpRuntimeExtrinsicInclusionMode, SpRuntimeHeader, SpRuntimeTransactionValidityTransactionSource, SpRuntimeTransactionValidityTransactionValidityError, SpRuntimeTransactionValidityValidTransaction, SpVersionRuntimeVersion, SpWeightsWeightV2Weight, XcmRuntimeApisConversionsError, XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError, XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisFeesError, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { PalletTransactionPaymentFeeDetails, PalletTransactionPaymentRuntimeDispatchInfo, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotPrimitivesV8ApprovalVotingParams, PolkadotPrimitivesV8AsyncBackingAsyncBackingParams, PolkadotPrimitivesV8AsyncBackingBackingState, PolkadotPrimitivesV8CandidateCommitments, PolkadotPrimitivesV8CandidateEvent, PolkadotPrimitivesV8CommittedCandidateReceipt, PolkadotPrimitivesV8CoreState, PolkadotPrimitivesV8DisputeState, PolkadotPrimitivesV8ExecutorParams, PolkadotPrimitivesV8GroupRotationInfo, PolkadotPrimitivesV8OccupiedCoreAssumption, PolkadotPrimitivesV8PersistedValidationData, PolkadotPrimitivesV8PvfCheckStatement, PolkadotPrimitivesV8ScrapedOnChainVotes, PolkadotPrimitivesV8SessionInfo, PolkadotPrimitivesV8SlashingDisputeProof, PolkadotPrimitivesV8SlashingPendingSlashes, PolkadotPrimitivesV8ValidatorAppPublic, PolkadotPrimitivesV8ValidatorAppSignature, PolkadotRuntimeOriginCaller, RelayCommonApisInflationInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeConfiguration, SpConsensusBabeEpoch, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyForkVotingProofOpaqueValue, SpConsensusBeefyFutureBlockVotingProof, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusBeefyValidatorSet, SpConsensusGrandpaAppPublic, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpCoreCryptoKeyTypeId, SpInherentsCheckInherentsResult, SpInherentsInherentData, SpMmrPrimitivesError, SpMmrPrimitivesLeafProof, SpRuntimeBlock, SpRuntimeDispatchError, SpRuntimeExtrinsicInclusionMode, SpRuntimeHeader, SpRuntimeTransactionValidityTransactionSource, SpRuntimeTransactionValidityTransactionValidityError, SpRuntimeTransactionValidityValidTransaction, SpVersionRuntimeVersion, SpWeightsWeightV2Weight, XcmRuntimeApisConversionsError, XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError, XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisFeesError, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
||||
@@ -80,14 +80,26 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
* Return the block number where BEEFY consensus is enabled/started
|
||||
**/
|
||||
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<u32>>>;
|
||||
/**
|
||||
* Generates a proof that the `prev_block_number` is part of the canonical chain at, `best_known_block_number`.
|
||||
**/
|
||||
generateAncestryProof: AugmentedCall<ApiType, (prev_block_number: u32 | AnyNumber | Uint8Array, best_known_block_number: Option<u32> | null | Uint8Array | u32 | AnyNumber) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the, given set. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `set_id` as parameter the current, implementations ignores this parameter and instead relies on this, method being called at the correct block height, i.e. any point at, which the given set id is live on-chain. Future implementations will, instead use indexed data through an offchain worker, not requiring, older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (set_id: u64 | AnyNumber | Uint8Array, authority_id: SpConsensusBeefyEcdsaCryptoPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation. The caller, must provide the equivocation proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
* Submits an unsigned extrinsic to report a double voting equivocation. The caller, must provide the double voting proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
submitReportDoubleVotingUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report a fork voting equivocation. The caller, must provide the fork voting proof (the ancestry proof should be obtained using, `generate_ancestry_proof`) and a key ownership proof (should be obtained using, `generate_key_ownership_proof`). The extrinsic will be unsigned and should only, be accepted for local authorship (not to be broadcast to the network). This method, returns `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportForkVotingUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyForkVotingProofOpaqueValue | { vote?: any; ancestryProof?: any; header?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report a future block voting equivocation. The caller, must provide the future block voting proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`)., The extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportFutureBlockVotingUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyFutureBlockVotingProof | { vote?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Return the current active BEEFY validator set
|
||||
**/
|
||||
@@ -176,7 +188,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
buildState: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<Null, Text>>>;
|
||||
/**
|
||||
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by, `id`.,, If `id` is `None` the function returns JSON blob representation of the default, `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default, `RuntimeGenesisConfig`.,, Otherwise function returns a JSON representation of the built-in, named, `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not, exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of, (potentially nested) key-value pairs that are intended for customizing the default, runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation, of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can, be used in `build_state` method.
|
||||
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by, `id`.,, If `id` is `None` the function returns JSON blob representation of the default, `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default, `RuntimeGenesisConfig`.,, Otherwise function returns a JSON representation of the built-in, named, `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not, exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of, (potentially nested) key-value pairs that are intended for customizing the default, runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation, of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can, be used in `build_state` method.
|
||||
**/
|
||||
getPreset: AugmentedCall<ApiType, (id: Option<Text> | null | Uint8Array | Text | string) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
@@ -290,9 +302,13 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
memberNeedsDelegateMigration: AugmentedCall<ApiType, (member: AccountId32 | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Returns the pending slash for a given pool member.
|
||||
* Returns the pending slash for a given pool member.,, If pending slash of the member exceeds `ExistentialDeposit`, it can be reported on, chain.
|
||||
**/
|
||||
memberPendingSlash: AugmentedCall<ApiType, (member: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the total contribution of a pool member including any balance that is unbonding.
|
||||
**/
|
||||
memberTotalBalance: AugmentedCall<ApiType, (who: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the pending rewards for the member that the AccountId was given for.
|
||||
**/
|
||||
@@ -301,6 +317,10 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
* Returns the equivalent balance of `points` for a given pool.
|
||||
**/
|
||||
pointsToBalance: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array, points: u128 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Total balance contributed to the pool.
|
||||
**/
|
||||
poolBalance: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns true if the pool with `pool_id` needs migration.,, This can happen when the `pallet-nomination-pools` has switched to using strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool, still has funds that were staked using the older strategy, [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use, [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake), to migrate the pool.
|
||||
**/
|
||||
@@ -330,35 +350,35 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Approval voting configuration parameters
|
||||
**/
|
||||
approvalVotingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV7ApprovalVotingParams>>;
|
||||
approvalVotingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV8ApprovalVotingParams>>;
|
||||
/**
|
||||
* Returns the persisted validation data for the given `ParaId` along with the corresponding, validation code hash. Instead of accepting assumption about the para, matches the validation, data hash against an expected one and yields `None` if they're not equal.
|
||||
**/
|
||||
assumedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, expected_persisted_validation_data_hash: H256 | string | Uint8Array) => Observable<Option<ITuple<[PolkadotPrimitivesV7PersistedValidationData, H256]>>>>;
|
||||
assumedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, expected_persisted_validation_data_hash: H256 | string | Uint8Array) => Observable<Option<ITuple<[PolkadotPrimitivesV8PersistedValidationData, H256]>>>>;
|
||||
/**
|
||||
* Returns candidate's acceptance limitations for asynchronous backing for a relay parent.
|
||||
**/
|
||||
asyncBackingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV7AsyncBackingAsyncBackingParams>>;
|
||||
asyncBackingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV8AsyncBackingAsyncBackingParams>>;
|
||||
/**
|
||||
* Yields information on all availability cores as relevant to the child block., Cores are either free or occupied. Free cores can have paras assigned to them.
|
||||
**/
|
||||
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7CoreState>>>;
|
||||
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV8CoreState>>>;
|
||||
/**
|
||||
* Get a vector of events concerning candidates that occurred within a block.
|
||||
**/
|
||||
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7CandidateEvent>>>;
|
||||
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV8CandidateEvent>>>;
|
||||
/**
|
||||
* Get the receipt of a candidate pending availability. This returns `Some` for any paras, assigned to occupied cores in `availability_cores` and `None` otherwise.
|
||||
**/
|
||||
candidatePendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7CommittedCandidateReceipt>>>;
|
||||
candidatePendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8CommittedCandidateReceipt>>>;
|
||||
/**
|
||||
* Elastic scaling support
|
||||
**/
|
||||
candidatesPendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Vec<PolkadotPrimitivesV7CommittedCandidateReceipt>>>;
|
||||
candidatesPendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Vec<PolkadotPrimitivesV8CommittedCandidateReceipt>>>;
|
||||
/**
|
||||
* Checks if the given validation outputs pass the acceptance criteria.
|
||||
**/
|
||||
checkValidationOutputs: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, outputs: PolkadotPrimitivesV7CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
checkValidationOutputs: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, outputs: PolkadotPrimitivesV8CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Claim queue
|
||||
**/
|
||||
@@ -370,7 +390,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Returns all onchain disputes.
|
||||
**/
|
||||
disputes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV7DisputeState]>>>>;
|
||||
disputes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV8DisputeState]>>>>;
|
||||
/**
|
||||
* Get all the pending inbound messages in the downward message queue for a para.
|
||||
**/
|
||||
@@ -382,7 +402,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Returns a merkle proof of a validator session key., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
keyOwnershipProof: AugmentedCall<ApiType, (validator_id: PolkadotPrimitivesV7ValidatorAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
keyOwnershipProof: AugmentedCall<ApiType, (validator_id: PolkadotPrimitivesV8ValidatorAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the minimum number of backing votes for a parachain candidate., This is a staging method! Do not use on production runtimes!
|
||||
**/
|
||||
@@ -394,15 +414,15 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
|
||||
**/
|
||||
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<PolkadotPrimitivesV7ScrapedOnChainVotes>>>;
|
||||
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<PolkadotPrimitivesV8ScrapedOnChainVotes>>>;
|
||||
/**
|
||||
* Returns the state of parachain backing for a given para.
|
||||
**/
|
||||
paraBackingState: AugmentedCall<ApiType, (_: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7AsyncBackingBackingState>>>;
|
||||
paraBackingState: AugmentedCall<ApiType, (_: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8AsyncBackingBackingState>>>;
|
||||
/**
|
||||
* Yields the persisted validation data for the given `ParaId` along with an assumption that, should be used if the para currently occupies a core.,, Returns `None` if either the para is not registered or the assumption is `Freed`, and the para already occupies a core.
|
||||
**/
|
||||
persistedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PolkadotPrimitivesV7PersistedValidationData>>>;
|
||||
persistedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV8OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PolkadotPrimitivesV8PersistedValidationData>>>;
|
||||
/**
|
||||
* Returns code hashes of PVFs that require pre-checking by validators in the active set.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
@@ -410,7 +430,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Returns execution parameters for the session.
|
||||
**/
|
||||
sessionExecutorParams: AugmentedCall<ApiType, (session_index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7ExecutorParams>>>;
|
||||
sessionExecutorParams: AugmentedCall<ApiType, (session_index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8ExecutorParams>>>;
|
||||
/**
|
||||
* Returns the session index expected at a child of the block.,, This can be used to instantiate a `SigningContext`.
|
||||
**/
|
||||
@@ -418,23 +438,23 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Get the session info for the given session, if stored.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
sessionInfo: AugmentedCall<ApiType, (index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7SessionInfo>>>;
|
||||
sessionInfo: AugmentedCall<ApiType, (index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV8SessionInfo>>>;
|
||||
/**
|
||||
* Submits a PVF pre-checking statement into the transaction pool.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PolkadotPrimitivesV7PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV7ValidatorAppSignature | string | Uint8Array) => Observable<Null>>;
|
||||
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PolkadotPrimitivesV8PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV8ValidatorAppSignature | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Submit an unsigned extrinsic to slash validators who lost a dispute about, a candidate of a past session., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
submitReportDisputeLost: AugmentedCall<ApiType, (dispute_proof: PolkadotPrimitivesV7SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, key_ownership_proof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
submitReportDisputeLost: AugmentedCall<ApiType, (dispute_proof: PolkadotPrimitivesV8SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, key_ownership_proof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Returns a list of validators that lost a past session dispute and need to be slashed., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV7SlashingPendingSlashes]>>>>;
|
||||
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV8SlashingPendingSlashes]>>>>;
|
||||
/**
|
||||
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.,, Returns `None` if either the para is not registered or the assumption is `Freed`, and the para already occupies a core.
|
||||
**/
|
||||
validationCode: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
validationCode: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV8OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the validation code from its hash.
|
||||
**/
|
||||
@@ -442,15 +462,15 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
validationCodeHash: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<H256>>>;
|
||||
validationCodeHash: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV8OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<H256>>>;
|
||||
/**
|
||||
* Returns the validator groups and rotation info localized based on the hypothetical child, of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`, should be the successor of the number of the block.
|
||||
**/
|
||||
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<u32>>, PolkadotPrimitivesV7GroupRotationInfo]>>>;
|
||||
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<u32>>, PolkadotPrimitivesV8GroupRotationInfo]>>>;
|
||||
/**
|
||||
* Get the current validators.
|
||||
**/
|
||||
validators: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7ValidatorAppPublic>>>;
|
||||
validators: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV8ValidatorAppPublic>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
|
||||
@@ -10,7 +10,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, FrameSupportScheduleDispatchTime, PalletBalancesAdjustmentDirection, PalletBrokerCoretimeInterfaceCoreAssignment, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletVestingVestingInfo, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV7ApprovalVotingParams, PolkadotPrimitivesV7AsyncBackingAsyncBackingParams, PolkadotPrimitivesV7ExecutorParams, PolkadotPrimitivesV7InherentData, PolkadotPrimitivesV7PvfCheckStatement, PolkadotPrimitivesV7SlashingDisputeProof, PolkadotPrimitivesV7ValidatorAppSignature, PolkadotPrimitivesVstagingSchedulerParams, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeOriginCaller, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeProxyType, PolkadotRuntimeRuntimeParameters, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyDoubleVotingProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, StagingXcmExecutorAssetTransferTransferType, StagingXcmV4Location, XcmV3WeightLimit, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, PalletBalancesAdjustmentDirection, PalletBrokerCoretimeInterfaceCoreAssignment, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletVestingVestingInfo, PolkadotParachainPrimitivesPrimitivesHrmpChannelId, PolkadotPrimitivesV8ApprovalVotingParams, PolkadotPrimitivesV8AsyncBackingAsyncBackingParams, PolkadotPrimitivesV8ExecutorParams, PolkadotPrimitivesV8InherentData, PolkadotPrimitivesV8PvfCheckStatement, PolkadotPrimitivesV8SchedulerParams, PolkadotPrimitivesV8SlashingDisputeProof, PolkadotPrimitivesV8ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonImplsVersionedLocatableAsset, PolkadotRuntimeOriginCaller, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyForkVotingProofAncestryProof, SpConsensusBeefyFutureBlockVotingProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, StagingXcmExecutorAssetTransferTransferType, StagingXcmV4Location, XcmV3WeightLimit, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
||||
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
||||
@@ -211,7 +211,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* against the extracted offender. If both are valid, the offence
|
||||
* will be reported.
|
||||
**/
|
||||
reportEquivocation: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
|
||||
reportDoubleVoting: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Report voter equivocation/misbehavior. This method will verify the
|
||||
* equivocation proof and validate the given key ownership proof
|
||||
@@ -223,7 +223,41 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* if the block author is defined it will be defined as the equivocation
|
||||
* reporter.
|
||||
**/
|
||||
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
|
||||
reportDoubleVotingUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyDoubleVotingProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Report fork voting equivocation. This method will verify the equivocation proof
|
||||
* and validate the given key ownership proof against the extracted offender.
|
||||
* If both are valid, the offence will be reported.
|
||||
**/
|
||||
reportForkVoting: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyForkVotingProofAncestryProof | { vote?: any; ancestryProof?: any; header?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyForkVotingProofAncestryProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Report fork voting equivocation. This method will verify the equivocation proof
|
||||
* and validate the given key ownership proof against the extracted offender.
|
||||
* If both are valid, the offence will be reported.
|
||||
*
|
||||
* This extrinsic must be called unsigned and it is expected that only
|
||||
* block authors will call it (validated in `ValidateUnsigned`), as such
|
||||
* if the block author is defined it will be defined as the equivocation
|
||||
* reporter.
|
||||
**/
|
||||
reportForkVotingUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyForkVotingProofAncestryProof | { vote?: any; ancestryProof?: any; header?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyForkVotingProofAncestryProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Report future block voting equivocation. This method will verify the equivocation proof
|
||||
* and validate the given key ownership proof against the extracted offender.
|
||||
* If both are valid, the offence will be reported.
|
||||
**/
|
||||
reportFutureBlockVoting: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyFutureBlockVotingProof | { vote?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyFutureBlockVotingProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Report future block voting equivocation. This method will verify the equivocation proof
|
||||
* and validate the given key ownership proof against the extracted offender.
|
||||
* If both are valid, the offence will be reported.
|
||||
*
|
||||
* This extrinsic must be called unsigned and it is expected that only
|
||||
* block authors will call it (validated in `ValidateUnsigned`), as such
|
||||
* if the block author is defined it will be defined as the equivocation
|
||||
* reporter.
|
||||
**/
|
||||
reportFutureBlockVotingUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyFutureBlockVotingProof | { vote?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyFutureBlockVotingProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Reset BEEFY consensus by setting a new BEEFY genesis at `delay_in_blocks` blocks in the
|
||||
* future.
|
||||
@@ -631,11 +665,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Set approval-voting-params.
|
||||
**/
|
||||
setApprovalVotingParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV7ApprovalVotingParams | { maxApprovalCoalesceCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7ApprovalVotingParams]>;
|
||||
setApprovalVotingParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV8ApprovalVotingParams | { maxApprovalCoalesceCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8ApprovalVotingParams]>;
|
||||
/**
|
||||
* Set the asynchronous backing parameters.
|
||||
**/
|
||||
setAsyncBackingParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV7AsyncBackingAsyncBackingParams | { maxCandidateDepth?: any; allowedAncestryLen?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7AsyncBackingAsyncBackingParams]>;
|
||||
setAsyncBackingParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV8AsyncBackingAsyncBackingParams | { maxCandidateDepth?: any; allowedAncestryLen?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8AsyncBackingAsyncBackingParams]>;
|
||||
/**
|
||||
* Setting this to true will disable consistency checks for the configuration setters.
|
||||
* Use with caution.
|
||||
@@ -663,7 +697,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Set PVF executor parameters.
|
||||
**/
|
||||
setExecutorParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV7ExecutorParams) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7ExecutorParams]>;
|
||||
setExecutorParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV8ExecutorParams) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8ExecutorParams]>;
|
||||
/**
|
||||
* Set the parachain validator-group rotation frequency
|
||||
**/
|
||||
@@ -813,7 +847,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Set scheduler-params.
|
||||
**/
|
||||
setSchedulerParams: AugmentedSubmittable<(updated: PolkadotPrimitivesVstagingSchedulerParams | { groupRotationFrequency?: any; parasAvailabilityPeriod?: any; maxValidatorsPerCore?: any; lookahead?: any; numCores?: any; maxAvailabilityTimeouts?: any; onDemandQueueMaxSize?: any; onDemandTargetQueueUtilization?: any; onDemandFeeVariability?: any; onDemandBaseFee?: any; ttl?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesVstagingSchedulerParams]>;
|
||||
setSchedulerParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV8SchedulerParams | { groupRotationFrequency?: any; parasAvailabilityPeriod?: any; maxValidatorsPerCore?: any; lookahead?: any; numCores?: any; maxAvailabilityTimeouts?: any; onDemandQueueMaxSize?: any; onDemandTargetQueueUtilization?: any; onDemandFeeVariability?: any; onDemandBaseFee?: any; ttl?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8SchedulerParams]>;
|
||||
/**
|
||||
* Set the scheduling lookahead, in expected number of blocks at peak throughput.
|
||||
**/
|
||||
@@ -1621,8 +1655,10 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:
|
||||
* [`adapter::StakeStrategyType::Delegate`].
|
||||
*
|
||||
* This call can be dispatched permissionlessly (i.e. by any account). If the member has
|
||||
* slash to be applied, caller may be rewarded with the part of the slash.
|
||||
* The pending slash amount of the member must be equal or more than `ExistentialDeposit`.
|
||||
* This call can be dispatched permissionlessly (i.e. by any account). If the execution
|
||||
* is successful, fee is refunded and caller may be rewarded with a part of the slash
|
||||
* based on the [`crate::pallet::Config::StakeAdapter`] configuration.
|
||||
**/
|
||||
applySlash: AugmentedSubmittable<(memberAccount: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||
/**
|
||||
@@ -1722,8 +1758,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
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.
|
||||
* Stake funds with a pool. The amount to bond is transferred from the member to the pool
|
||||
* account and immediately increases the pools bond.
|
||||
*
|
||||
* The method of transferring the amount to the pool account is determined by
|
||||
* [`adapter::StakeStrategyType`]. If the pool is configured to use
|
||||
* [`adapter::StakeStrategyType::Delegate`], the funds remain in the account of
|
||||
* the `origin`, while the pool gains the right to use these funds for staking.
|
||||
*
|
||||
* # Note
|
||||
*
|
||||
@@ -1982,20 +2023,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Enter the paras inherent. This will process bitfields and backed candidates.
|
||||
**/
|
||||
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV7InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7InherentData]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
parameters: {
|
||||
/**
|
||||
* Set the value of a parameter.
|
||||
*
|
||||
* The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be
|
||||
* deleted by setting them to `None`.
|
||||
**/
|
||||
setParameter: AugmentedSubmittable<(keyValue: PolkadotRuntimeRuntimeParameters | { Inflation: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeRuntimeParameters]>;
|
||||
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV8InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8InherentData]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -2049,7 +2077,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and
|
||||
* enacts the results if that was the last vote before achieving the supermajority.
|
||||
**/
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV7PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV7ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7PvfCheckStatement, PolkadotPrimitivesV7ValidatorAppSignature]>;
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV8PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV8ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8PvfCheckStatement, PolkadotPrimitivesV8ValidatorAppSignature]>;
|
||||
/**
|
||||
* Remove the validation code from the storage iff the reference count is 0.
|
||||
*
|
||||
@@ -2077,7 +2105,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
parasSlashing: {
|
||||
reportDisputeLostUnsigned: AugmentedSubmittable<(disputeProof: PolkadotPrimitivesV7SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV7SlashingDisputeProof, SpSessionMembershipProof]>;
|
||||
reportDisputeLostUnsigned: AugmentedSubmittable<(disputeProof: PolkadotPrimitivesV8SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV8SlashingDisputeProof, SpSessionMembershipProof]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -2136,7 +2164,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - `delay`: The announcement period required of the initial proxy. Will generally be
|
||||
* zero.
|
||||
**/
|
||||
addProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PolkadotRuntimeProxyType, u32]>;
|
||||
addProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | 'ParaRegistration' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PolkadotRuntimeProxyType, u32]>;
|
||||
/**
|
||||
* Publish the hash of a proxy-call that will be made in the future.
|
||||
*
|
||||
@@ -2175,7 +2203,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Fails if there are insufficient funds to pay for deposit.
|
||||
**/
|
||||
createPure: AugmentedSubmittable<(proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeProxyType, u32, u16]>;
|
||||
createPure: AugmentedSubmittable<(proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | 'ParaRegistration' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeProxyType, u32, u16]>;
|
||||
/**
|
||||
* Removes a previously spawned pure proxy.
|
||||
*
|
||||
@@ -2194,7 +2222,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Fails with `NoPermission` in case the caller is not a previously created pure
|
||||
* account whose `pure` call has corresponding parameters.
|
||||
**/
|
||||
killPure: AugmentedSubmittable<(spawner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PolkadotRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
||||
killPure: AugmentedSubmittable<(spawner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | 'ParaRegistration' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PolkadotRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Dispatch the given `call` from an account that the sender is authorised for through
|
||||
* `add_proxy`.
|
||||
@@ -2206,7 +2234,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||
* - `call`: The call to be made by the `real` account.
|
||||
**/
|
||||
proxy: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Option<PolkadotRuntimeProxyType>, Call]>;
|
||||
proxy: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | 'ParaRegistration' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Option<PolkadotRuntimeProxyType>, Call]>;
|
||||
/**
|
||||
* Dispatch the given `call` from an account that the sender is authorized for through
|
||||
* `add_proxy`.
|
||||
@@ -2220,7 +2248,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||
* - `call`: The call to be made by the `real` account.
|
||||
**/
|
||||
proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<PolkadotRuntimeProxyType>, Call]>;
|
||||
proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | 'ParaRegistration' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<PolkadotRuntimeProxyType>, Call]>;
|
||||
/**
|
||||
* Remove the given announcement of a delegate.
|
||||
*
|
||||
@@ -2265,7 +2293,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - `proxy`: The account that the `caller` would like to remove as a proxy.
|
||||
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
||||
**/
|
||||
removeProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PolkadotRuntimeProxyType, u32]>;
|
||||
removeProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'CancelProxy' | 'Auction' | 'NominationPools' | 'ParaRegistration' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PolkadotRuntimeProxyType, u32]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.5.2",
|
||||
"version": "15.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-core": "15.5.2",
|
||||
"@polkadot/types": "15.5.2",
|
||||
"@polkadot/util": "^13.3.1",
|
||||
"@polkadot/rpc-core": "15.9.2",
|
||||
"@polkadot/types": "15.9.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '15.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '15.9.2' };
|
||||
|
||||
@@ -68,13 +68,10 @@ export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmi
|
||||
send (statusCb: Callback<R>): SubmittableResultSubscription<ApiType, R>;
|
||||
|
||||
/**
|
||||
* @description Sign and broadcast the constructued transaction.
|
||||
* @description Sign the constructed transaction asynchronously.
|
||||
*
|
||||
* Note for injected signers:
|
||||
* As of v12.0.2 and up the `SignerResult` return type for `signPayload` allows for the `signedTransaction` field.
|
||||
* This allows the signer to input a signed transaction that will modify the payload. This
|
||||
* The api will ensure that the Call Data is not changed. This allows for the signer to modify the payload to add
|
||||
* things like `mode`, and `metadataHash` for signedExtensions such as `CheckMetadataHash`.
|
||||
* The result is a signed extrinsic that is ready to be broadcast to the network via `.send()`, `rpc.author.submitExtrinsic()`, or
|
||||
* any custom submission logic.
|
||||
*/
|
||||
signAsync (account: AddressOrPair, _options?: Partial<SignerOptions>): PromiseOrObs<ApiType, this>;
|
||||
|
||||
|
||||
@@ -18,22 +18,22 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.5.2",
|
||||
"version": "15.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "15.5.2",
|
||||
"@polkadot/api-augment": "15.5.2",
|
||||
"@polkadot/types": "15.5.2",
|
||||
"@polkadot/types-codec": "15.5.2",
|
||||
"@polkadot/types-create": "15.5.2",
|
||||
"@polkadot/util": "^13.3.1",
|
||||
"@polkadot/util-crypto": "^13.3.1",
|
||||
"@polkadot/api": "15.9.2",
|
||||
"@polkadot/api-augment": "15.9.2",
|
||||
"@polkadot/types": "15.9.2",
|
||||
"@polkadot/types-codec": "15.9.2",
|
||||
"@polkadot/types-create": "15.9.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/util-crypto": "^13.4.4",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "15.5.2",
|
||||
"@polkadot/keyring": "^13.3.1",
|
||||
"@polkadot/types-support": "15.5.2"
|
||||
"@polkadot/api-augment": "15.9.2",
|
||||
"@polkadot/keyring": "^13.4.4",
|
||||
"@polkadot/types-support": "15.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '15.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '15.9.2' };
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
# @polkadot/api-derive
|
||||
|
||||
Common functions used across Polkadot, derived from RPC calls and storage queries.
|
||||
Collection of high-level utility functions built on top of the @polkadot/api library. Designed to simplify the process of querying complex on-chain data by combining multiple RPC calls, storage queries, and runtime logic into a single, callable function.
|
||||
|
||||
Instead of manually fetching and processing blockchain data, developers can use `api.derive` methods to retrieve information.
|
||||
|
||||
## Available Derive Namespaces
|
||||
|
||||
The derive functions are categorized into namespaces based on different common Substrate modules. Accesible by calling `api.derive.NAMESPACE` (e.g. `api.derive.balances`). The available modules are as follows:
|
||||
|
||||
- [accounts](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/accounts)
|
||||
- [alliance](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/alliance)
|
||||
- [bagsList](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/bagsList)
|
||||
- [balances](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/balances)
|
||||
- [bounties](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/bounties)
|
||||
- [chain](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/chain)
|
||||
- [contracts](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/contracts)
|
||||
- [council](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/council)
|
||||
- [crowdloan](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/crowdloan)
|
||||
- [democracy](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/democracy)
|
||||
- [elections](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/elections)
|
||||
- [imOnline](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/imOnline)
|
||||
- [membership](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/membership)
|
||||
- [parachains](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/parachains)
|
||||
- [session](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/session)
|
||||
- [society](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/society)
|
||||
- [staking](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/staking)
|
||||
- [technicalCommittee](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/technicalCommittee)
|
||||
- [treasury](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/treasury)
|
||||
- [tx](https://github.com/polkadot-js/api/tree/master/packages/api-derive/src/tx)
|
||||
|
||||
@@ -18,25 +18,25 @@
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "15.5.2",
|
||||
"version": "15.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "15.5.2",
|
||||
"@polkadot/api-augment": "15.5.2",
|
||||
"@polkadot/api-base": "15.5.2",
|
||||
"@polkadot/rpc-core": "15.5.2",
|
||||
"@polkadot/types": "15.5.2",
|
||||
"@polkadot/types-codec": "15.5.2",
|
||||
"@polkadot/util": "^13.3.1",
|
||||
"@polkadot/util-crypto": "^13.3.1",
|
||||
"@polkadot/api": "15.9.2",
|
||||
"@polkadot/api-augment": "15.9.2",
|
||||
"@polkadot/api-base": "15.9.2",
|
||||
"@polkadot/rpc-core": "15.9.2",
|
||||
"@polkadot/types": "15.9.2",
|
||||
"@polkadot/types-codec": "15.9.2",
|
||||
"@polkadot/util": "^13.4.4",
|
||||
"@polkadot/util-crypto": "^13.4.4",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "15.5.2",
|
||||
"@polkadot/api-augment": "15.5.2",
|
||||
"@polkadot/rpc-augment": "15.5.2",
|
||||
"@polkadot/rpc-provider": "15.5.2",
|
||||
"@polkadot/types-support": "15.5.2"
|
||||
"@polkadot/api": "15.9.2",
|
||||
"@polkadot/api-augment": "15.9.2",
|
||||
"@polkadot/rpc-augment": "15.9.2",
|
||||
"@polkadot/rpc-provider": "15.9.2",
|
||||
"@polkadot/types-support": "15.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,16 @@ import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name accountId
|
||||
* @param {(Address | AccountId | AccountIndex | string | null)} address - An accounts address in various formats.
|
||||
* @description An [[AccountId]]
|
||||
* @param {(Address | AccountId | AccountIndex | string | null)} address An accounts address in various formats.
|
||||
* @description Resolves an address (in different formats) to its corresponding `AccountId`.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const ALICE = "F7Hs";
|
||||
*
|
||||
* api.derive.accounts.accountId(ALICE, (accountId) => {
|
||||
* console.log(`Resolved AccountId: ${accountId}`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function accountId (instanceId: string, api: DeriveApi): (address?: Address | AccountId | AccountIndex | string | null) => Observable<AccountId> {
|
||||
return memo(instanceId, (address?: Address | AccountId | AccountIndex | string | null): Observable<AccountId> => {
|
||||
|
||||
@@ -68,8 +68,18 @@ export function _flags (instanceId: string, api: DeriveApi): () => Observable<Fl
|
||||
}
|
||||
|
||||
/**
|
||||
* @name info
|
||||
* @description Returns account membership flags
|
||||
* @name flags
|
||||
* @param {(AccountId | Address | string | null)} address The account identifier.
|
||||
* @description Retrieves the membership flags for a given account.
|
||||
* @example
|
||||
* const ALICE = "F7Hs";
|
||||
*
|
||||
* api.derive.accounts.flags(ALICE, (flags) => {
|
||||
* console.log(
|
||||
* `Account Flags:`,
|
||||
* Object.keys(flags).map((flag) => `${flag}: ${flags[flag]}`)
|
||||
* );
|
||||
* });
|
||||
*/
|
||||
export function flags (instanceId: string, api: DeriveApi): (address?: AccountId | Address | string | null) => Observable<DeriveAccountFlags> {
|
||||
return memo(instanceId, (address?: AccountId | Address | string | null): Observable<DeriveAccountFlags> =>
|
||||
|
||||
@@ -14,11 +14,9 @@ import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name idAndIndex
|
||||
* @param {(Address | AccountId | AccountIndex | Uint8Array | string | null)} address - An accounts address in various formats.
|
||||
* @description An array containing the [[AccountId]] and [[AccountIndex]] as optional values.
|
||||
* @param {(Address | AccountId | AccountIndex | Uint8Array | string | null)} address An accounts address in various formats.
|
||||
* @description An array containing the [[AccountId]] and [[AccountIndex]] as optional values.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* api.derive.accounts.idAndIndex('F7Hs', ([id, ix]) => {
|
||||
* console.log(`AccountId #${id} with corresponding AccountIndex ${ix}`);
|
||||
|
||||
@@ -11,11 +11,9 @@ import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name idToIndex
|
||||
* @param {( AccountId | string )} accountId - An accounts Id in different formats.
|
||||
* @returns Returns the corresponding AccountIndex.
|
||||
* @description Retrieves the corresponding AccountIndex.
|
||||
* @param {( AccountId | string )} accountId An accounts Id in different formats.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
|
||||
* api.derive.accounts.idToIndex(ALICE, (accountIndex) => {
|
||||
|
||||
@@ -125,7 +125,19 @@ export function _identity (instanceId: string, api: DeriveApi): (accountId?: Acc
|
||||
|
||||
/**
|
||||
* @name identity
|
||||
* @description Returns identity info for an account
|
||||
* @description Retrieves the on chain identity information for a given account.
|
||||
* @param {(AccountId | Uint8Array | string)} accoutId The account identifier to query the identity for.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const ALICE = "13xAUH";
|
||||
*
|
||||
* api.derive.accounts.identity(ALICE, (identity) => {
|
||||
* console.log(
|
||||
* "Account Identity:",
|
||||
* Object.keys(identity).map((key) => `${key}: ${identity[key]}`)
|
||||
* );
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function identity (instanceId: string, api: DeriveApi): (accountId?: AccountId | Uint8Array | string) => Observable<DeriveAccountRegistration> {
|
||||
return memo(instanceId, (accountId?: AccountId | Uint8Array | string): Observable<DeriveAccountRegistration> =>
|
||||
@@ -148,7 +160,7 @@ export function identity (instanceId: string, api: DeriveApi): (accountId?: Acco
|
||||
function getSubIdentities (identity: DeriveAccountRegistration, api: DeriveApi, accountId?: AccountId | Uint8Array | string): Observable<DeriveAccountRegistration> {
|
||||
const targetAccount = identity.parent || accountId;
|
||||
|
||||
if (!targetAccount) {
|
||||
if (!targetAccount || !api.query.identity) {
|
||||
// No valid accountId return the identity as-is
|
||||
return of(identity);
|
||||
}
|
||||
@@ -165,11 +177,32 @@ function getSubIdentities (identity: DeriveAccountRegistration, api: DeriveApi,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name hasIdentity
|
||||
* @description Checks if a specific account has an identity registered on chain.
|
||||
* @param {(AccountId | Uint8Array | string)} accoutId The account identifier to query.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const ALICE = "13AU";
|
||||
* console.log(await api.derive.accounts.hasIdentity(ALICE));
|
||||
* ```
|
||||
*/
|
||||
export const hasIdentity = /*#__PURE__*/ firstMemo(
|
||||
(api: DeriveApi, accountId: AccountId | Uint8Array | string) =>
|
||||
api.derive.accounts.hasIdentityMulti([accountId])
|
||||
);
|
||||
|
||||
/**
|
||||
* @name hasIdentityMulti
|
||||
* @description Checks whether multiple accounts have on chain identities registered.
|
||||
* @param {(AccountId | Uint8Array | string)[]} accountIds Array of account identifiers to query.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const ALICE = "13AU";
|
||||
* const BOB = "16WW";
|
||||
* console.log(await api.derive.accounts.hasIdentityMulti([ALICE, BOB]));
|
||||
* ```
|
||||
*/
|
||||
export function hasIdentityMulti (instanceId: string, api: DeriveApi): (accountIds: (AccountId | Uint8Array | string)[]) => Observable<DeriveHasIdentity[]> {
|
||||
return memo(instanceId, (accountIds: (AccountId | Uint8Array | string)[]): Observable<DeriveHasIdentity[]> =>
|
||||
api.query.identity?.identityOf
|
||||
|
||||
@@ -11,15 +11,13 @@ import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name indexToId
|
||||
* @param {( AccountIndex | string )} accountIndex - An accounts index in different formats.
|
||||
* @returns Returns the corresponding AccountId.
|
||||
* @description Resolves an AccountIndex (short address) to the full AccountId.
|
||||
* @param {( AccountIndex | string )} accountIndex An accounts index in different formats.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* api.derive.accounts.indexToId('F7Hs', (accountId) => {
|
||||
* console.log(`The AccountId of F7Hs is ${accountId}`);
|
||||
* });
|
||||
* const ALICE = "13AU";
|
||||
* const id = await api.derive.accounts.indexToId(ALICE);
|
||||
* console.log(id);
|
||||
* ```
|
||||
*/
|
||||
export function indexToId (instanceId: string, api: DeriveApi): (accountIndex: AccountIndex | string) => Observable<AccountId | undefined> {
|
||||
|
||||
@@ -29,10 +29,8 @@ function queryAccounts (api: DeriveApi): Observable<AccountIndexes> {
|
||||
* @returns Returns all the indexes on the system.
|
||||
* @description This is an unwieldly query since it loops through
|
||||
* all of the enumsets and returns all of the values found. This could be up to 32k depending
|
||||
* on the number of active accounts in the system
|
||||
* on the number of active accounts in the system.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* api.derive.accounts.indexes((indexes) => {
|
||||
* console.log('All existing AccountIndexes', indexes);
|
||||
|
||||
@@ -29,7 +29,17 @@ function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string
|
||||
|
||||
/**
|
||||
* @name info
|
||||
* @description Returns aux. info with regards to an account, current that includes the accountId, accountIndex and nickname
|
||||
* @description Returns aux. info with regards to an account, current that includes the accountId, accountIndex, identity and nickname
|
||||
* @param {(AccountIndex | AccountId | Address | Uint8Array | string | null)} address An accounts in different formats.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const ALICE = "13AU";
|
||||
* const info = await api.derive.accounts.info(ALICE);
|
||||
* console.log(
|
||||
* "Account Info: ",
|
||||
* Object.keys(info).map((key) => `${key}: ${info[key]}`)
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export function info (instanceId: string, api: DeriveApi): (address?: AccountIndex | AccountId | Address | Uint8Array | string | null) => Observable<DeriveAccountInfo> {
|
||||
return memo(instanceId, (address?: AccountIndex | AccountId | Address | Uint8Array | string | null): Observable<DeriveAccountInfo> =>
|
||||
|
||||
@@ -3,12 +3,74 @@
|
||||
|
||||
import { hasProposals as collectiveHasProposals, members as collectiveMembers, prime as collectivePrime, proposal as collectiveProposal, proposalCount as collectiveProposalCount, proposalHashes as collectiveProposalHashes, proposals as collectiveProposals } from '../collective/index.js';
|
||||
|
||||
/**
|
||||
* @name members
|
||||
* @description Retrieves the list of members in the "allianceMotion" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const members = await api.derive.alliance.members();
|
||||
* console.log(`Members: ${JSON.stringify(members)});
|
||||
* ```
|
||||
*/
|
||||
export const members = /*#__PURE__*/ collectiveMembers('allianceMotion');
|
||||
|
||||
/**
|
||||
* @name hasProposals
|
||||
* @description Checks if there are any active proposals in the "allianceMotion" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const exists = await api.derive.alliance.hasProposals();
|
||||
* console.log(exists);
|
||||
* ```
|
||||
*/
|
||||
export const hasProposals = /*#__PURE__*/ collectiveHasProposals('allianceMotion');
|
||||
/**
|
||||
* @name proposal
|
||||
* @description Retrieves details of a specific proposal in the "allianceMotion" collective by its hash.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const proposalDetails = await api.derive.alliance.proposal(PROPOSAL_HASH);
|
||||
* console.log(proposalDetails);
|
||||
* ```
|
||||
*/
|
||||
export const proposal = /*#__PURE__*/ collectiveProposal('allianceMotion');
|
||||
/**
|
||||
* @name proposalCount
|
||||
* @description Retrieves the total number of proposals in the "allianceMotion" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const count = await api.derive.alliance.proposalCount();
|
||||
* console.log(`Amount of proposals: ${count}`);
|
||||
* ```
|
||||
*/
|
||||
export const proposalCount = /*#__PURE__*/ collectiveProposalCount('allianceMotion');
|
||||
/**
|
||||
* @name proposalHashes
|
||||
* @description Retrieves an array of hashes for all active proposals in the "allianceMotion" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const hashes = await api.derive.alliance.proposalHashes();
|
||||
* console.log(`Proposals ${JSON.stringify(hashes)}`);
|
||||
* ```
|
||||
*/
|
||||
export const proposalHashes = /*#__PURE__*/ collectiveProposalHashes('allianceMotion');
|
||||
/**
|
||||
* @name proposals
|
||||
* @description Retrieves a list of all active proposals in the "allianceMotion" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const proposals = await api.derive.alliance.proposals();
|
||||
* console.log(proposals);
|
||||
* ```
|
||||
*/
|
||||
export const proposals = /*#__PURE__*/ collectiveProposals('allianceMotion');
|
||||
|
||||
/**
|
||||
* @name prime
|
||||
* @description Retrieves the prime member of the "allianceMotion" collective, if one exists.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const primeMember = await api.derive.alliance.prime();
|
||||
* console.log(primeMember);
|
||||
* ```
|
||||
*/
|
||||
export const prime = /*#__PURE__*/ collectivePrime('allianceMotion');
|
||||
|
||||
@@ -65,6 +65,11 @@ export function all (instanceId: string, api: DeriveApi): () => Observable<Bag[]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name get
|
||||
* @param {(BN | number)} id The id of the bag to retrieve.
|
||||
* @description Retrieves a specific bag from the BagsList pallet by its id.
|
||||
*/
|
||||
export function get (instanceId: string, api: DeriveApi): (id: BN | number) => Observable<Bag> {
|
||||
return memo(instanceId, (id: BN | number): Observable<Bag> =>
|
||||
api.derive.bagsList._getIds([bnToBn(id)]).pipe(
|
||||
|
||||
@@ -12,6 +12,11 @@ import { objectSpread } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name expand
|
||||
* @description Expands a given bag by retrieving all its nodes (accounts contained within the bag).
|
||||
* @param {Bag} bag The bag to be expanded.
|
||||
*/
|
||||
export function expand (instanceId: string, api: DeriveApi): (bag: Bag) => Observable<BagExpanded> {
|
||||
return memo(instanceId, (bag: Bag): Observable<BagExpanded> =>
|
||||
api.derive.bagsList.listNodes(bag.bag).pipe(
|
||||
@@ -20,6 +25,11 @@ export function expand (instanceId: string, api: DeriveApi): (bag: Bag) => Obser
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name getExpanded
|
||||
* @description Retrieves and expands a specific bag from the BagsList pallet.
|
||||
* @param {BN | number} id The id of the bag to expand.
|
||||
*/
|
||||
export function getExpanded (instanceId: string, api: DeriveApi): (id: BN | number) => Observable<BagExpanded> {
|
||||
return memo(instanceId, (id: BN | number): Observable<BagExpanded> =>
|
||||
api.derive.bagsList.get(id).pipe(
|
||||
|
||||
@@ -36,6 +36,11 @@ function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name listNodes
|
||||
* @param {(PalletBagsListListBag | null)} bag A reference to a specific bag in the BagsList pallet.
|
||||
* @description Retrieves the list of nodes (accounts) contained in a specific bag within the BagsList pallet.
|
||||
*/
|
||||
export function listNodes (instanceId: string, api: DeriveApi): (bag: PalletBagsListListBag | null) => Observable<PalletBagsListListNode[]> {
|
||||
return memo(instanceId, (bag: PalletBagsListListBag | null): Observable<PalletBagsListListNode[]> =>
|
||||
bag && bag.head.isSome
|
||||
|
||||
@@ -167,11 +167,9 @@ function querySystemAccount (api: DeriveApi, accountId: AccountId): Observable<R
|
||||
|
||||
/**
|
||||
* @name account
|
||||
* @param {( AccountIndex | AccountId | Address | string )} address - An accounts Id in different formats.
|
||||
* @returns An object containing the results of various balance queries
|
||||
* @description Retrieves the essential balance details for an account, such as free balance and account nonce.
|
||||
* @param {( AccountIndex | AccountId | Address | string )} address An accountsId in different formats.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* const ALICE = 'F7Hs';
|
||||
*
|
||||
|
||||
@@ -210,16 +210,17 @@ function queryCurrent (api: DeriveApi, accountId: AccountId | string, balanceIns
|
||||
|
||||
/**
|
||||
* @name all
|
||||
* @param {( AccountIndex | AccountId | Address | string )} address - An accounts Id in different formats.
|
||||
* @returns An object containing the results of various balance queries
|
||||
* @description Retrieves the complete balance information for an account, including free balance, locked balance, reserved balance, and more.
|
||||
* @param {( AccountId | string )} address An accountsId in different formats.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* const ALICE = 'F7Hs';
|
||||
*
|
||||
* api.derive.balances.all(ALICE, ({ accountId, lockedBalance }) => {
|
||||
* console.log(`The account ${accountId} has a locked balance ${lockedBalance} units.`);
|
||||
* api.derive.balances.account(ALICE, (accountInfo) => {
|
||||
* console.log(
|
||||
* `${accountInfo.accountId} info:`,
|
||||
* Object.keys(accountInfo).map((key) => `${key}: ${accountInfo[key]}`)
|
||||
* );
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,21 @@ import { all } from './all.js';
|
||||
export * from './account.js';
|
||||
export * from './votingBalances.js';
|
||||
|
||||
/**
|
||||
* @name votingBalance
|
||||
* @param {( AccountId | string )} address An accounts Id in different formats.
|
||||
* @returns An object containing the results of various balance queries
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* const ALICE = 'F7Hs';
|
||||
*
|
||||
* api.derive.balances.votingBalance(ALICE, ({ accountId, lockedBalance }) => {
|
||||
* console.log(`The account ${accountId} has a locked balance ${lockedBalance} units.`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
const votingBalance = all;
|
||||
|
||||
export { all, votingBalance };
|
||||
|
||||
@@ -9,6 +9,17 @@ import { combineLatest, of } from 'rxjs';
|
||||
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name votingBalances
|
||||
* @description Retrieves the balance information for multiple accounts, typically used in governance-related contexts to check voting power.
|
||||
* @param {(AccountId | AccountIndex | Address | string)[]} addresses An array of account identifiers.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const addresses = ["5D4b...Zf1", "5HGj...yrV"];
|
||||
* const balances = await api.derive.balances.votingBalances(addresses);
|
||||
* console.log("Voting Balances:", balances);
|
||||
* ```
|
||||
*/
|
||||
export function votingBalances (instanceId: string, api: DeriveApi): (addresses?: (AccountId | AccountIndex | Address | string)[]) => Observable<DeriveBalancesAccount[]> {
|
||||
return memo(instanceId, (addresses?: (AccountId | AccountIndex | Address | string)[]): Observable<DeriveBalancesAccount[]> =>
|
||||
!addresses?.length
|
||||
|
||||
@@ -33,6 +33,15 @@ function parseResult ([maybeBounties, maybeDescriptions, ids, bountyProposals]:
|
||||
return bounties;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name bounties
|
||||
* @descrive Retrieves all active bounties, their descriptions, and associated proposals.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const bounties = await api.derive.bounties();
|
||||
* console.log("Active bounties:", bounties);
|
||||
* ```
|
||||
*/
|
||||
export function bounties (instanceId: string, api: DeriveApi): () => Observable<DeriveBounties> {
|
||||
const bountyBase = api.query.bounties || api.query.treasury;
|
||||
|
||||
|
||||
@@ -7,10 +7,8 @@ import { createBlockNumberDerive } from './util.js';
|
||||
|
||||
/**
|
||||
* @name bestNumber
|
||||
* @returns The latest block number.
|
||||
* @descrive Retrieves the latest block number.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* api.derive.chain.bestNumber((blockNumber) => {
|
||||
* console.log(`the current best block is #${blockNumber}`);
|
||||
|
||||
@@ -10,8 +10,6 @@ import { createBlockNumberDerive } from './util.js';
|
||||
* @returns A BlockNumber
|
||||
* @description Get the latest finalized block number.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* api.derive.chain.bestNumberFinalized((blockNumber) => {
|
||||
* console.log(`the current finalized block is #${blockNumber}`);
|
||||
|
||||
@@ -13,9 +13,7 @@ import { memo } from '../util/index.js';
|
||||
* @name bestNumberLag
|
||||
* @returns A number of blocks
|
||||
* @description Calculates the lag between finalized head and best head
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* @examplew
|
||||
* ```javascript
|
||||
* api.derive.chain.bestNumberLag((lag) => {
|
||||
* console.log(`finalized is ${lag} blocks behind head`);
|
||||
|
||||
@@ -13,11 +13,9 @@ import { getAuthorDetails } from './util.js';
|
||||
|
||||
/**
|
||||
* @name getBlock
|
||||
* @param {( Uint8Array | string )} hash - A block hash as U8 array or string.
|
||||
* @param {( Uint8Array | string )} hash A block hash as U8 array or string.
|
||||
* @description Get a specific block (e.g. rpc.chain.getBlock) and extend it with the author
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* const { author, block } = await api.derive.chain.getBlock('0x123...456');
|
||||
*
|
||||
|
||||
@@ -10,6 +10,17 @@ import { switchMap } from 'rxjs';
|
||||
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name getBlockByNumber
|
||||
* @param {( BN | bigint | Uint8Array | number | string )} blockNumber
|
||||
* @description Get a specific block (e.g. rpc.chain.getBlock) and extend it with the author by block number
|
||||
* @example
|
||||
* ```javascript
|
||||
* const { author, block } = await api.derive.chain.getBlockByNumber(123);
|
||||
*
|
||||
* console.log(`block #${block.header.number} was authored by ${author}`);
|
||||
* ```
|
||||
*/
|
||||
export function getBlockByNumber (instanceId: string, api: DeriveApi): (blockNumber: AnyNumber) => Observable<SignedBlockExtended> {
|
||||
return memo(instanceId, (blockNumber: AnyNumber): Observable<SignedBlockExtended> =>
|
||||
api.rpc.chain.getBlockHash(blockNumber).pipe(
|
||||
|
||||
@@ -17,8 +17,6 @@ import { getAuthorDetails } from './util.js';
|
||||
* @returns An array containing the block header and the block author
|
||||
* @description Get a specific block header and extend it with the author
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* const { author, number } = await api.derive.chain.getHeader('0x123...456');
|
||||
*
|
||||
|
||||
@@ -11,7 +11,13 @@ import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name subscribeFinalizedBlocks
|
||||
* @returns The finalized block & events for that block
|
||||
* @description Retrieves the finalized block & events for that block
|
||||
* @example
|
||||
* ```javascript
|
||||
* const unsub = await api.derive.chain.subscribeFinalizedBlocks((finalizedBlock) => {
|
||||
* console.log(`# Finalized block ${finalizedBlock.block.hash}`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function subscribeFinalizedBlocks (instanceId: string, api: DeriveApi): () => Observable<SignedBlockExtended> {
|
||||
return memo(instanceId, (): Observable<SignedBlockExtended> =>
|
||||
|
||||
@@ -29,8 +29,14 @@ export function _getHeaderRange (instanceId: string, api: DeriveApi): (startHash
|
||||
* @description An observable of the finalized block headers. Unlike the base
|
||||
* chain.subscribeFinalizedHeads this does not skip any headers. Since finalization
|
||||
* may skip specific blocks (finalization happens in terms of chains), this version
|
||||
* of the derive tracks missing headers (since last retrieved) and provides them
|
||||
* to the caller
|
||||
* of the derive tracks missing headers (since last retrieved) and provides them
|
||||
* to the caller.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const unsub = await api.derive.chain.subscribeFinalizedHeads((finalizedHead) => {
|
||||
* console.log(`${finalizedHead.hash}`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function subscribeFinalizedHeads (instanceId: string, api: DeriveApi): () => Observable<Header> {
|
||||
return memo(instanceId, (): Observable<Header> => {
|
||||
|
||||
@@ -12,6 +12,12 @@ import { memo } from '../util/index.js';
|
||||
/**
|
||||
* @name subscribeNewBlocks
|
||||
* @returns The latest block & events for that block
|
||||
* @example
|
||||
* ```javascript
|
||||
* const unsub = await api.derive.chain.subscribeNewBlocks((newBlock) => {
|
||||
* console.log(`Block Hash: ${newBlock.hash}`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function subscribeNewBlocks (instanceId: string, api: DeriveApi): () => Observable<SignedBlockExtended> {
|
||||
return memo(instanceId, (): Observable<SignedBlockExtended> =>
|
||||
|
||||
@@ -13,11 +13,9 @@ import { getAuthorDetails } from './util.js';
|
||||
|
||||
/**
|
||||
* @name subscribeNewHeads
|
||||
* @returns A header with the current header (including extracted author)
|
||||
* @description An observable of the current block header and it's author
|
||||
* @returns A header with the current header (including extracted author).
|
||||
* @description An observable of the current block header and it's author.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* api.derive.chain.subscribeNewHeads((header) => {
|
||||
* console.log(`block #${header.number} was authored by ${header.author}`);
|
||||
|
||||
@@ -35,8 +35,6 @@ function queryConstants (api: DeriveApi): Observable<ResultV2> {
|
||||
* @returns An object containing the combined results of the queries for
|
||||
* all relevant contract fees as declared in the substrate chain spec.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* api.derive.contracts.fees(([creationFee, transferFee]) => {
|
||||
* console.log(`The fee for creating a new contract on this chain is ${creationFee} units. The fee required to call this contract is ${transferFee} units.`);
|
||||
|
||||
@@ -6,12 +6,74 @@ import { hasProposals as collectiveHasProposals, members as collectiveMembers, p
|
||||
export * from './votes.js';
|
||||
export * from './votesOf.js';
|
||||
|
||||
/**
|
||||
* @name members
|
||||
* @description Retrieves the list of members in the "council" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const members = await api.derive.council.members();
|
||||
* console.log(`Members: ${JSON.stringify(members)});
|
||||
* ```
|
||||
*/
|
||||
export const members = /*#__PURE__*/ collectiveMembers('council');
|
||||
|
||||
/**
|
||||
* @name hasProposals
|
||||
* @description Checks if there are any active proposals in the "council" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const exists = await api.derive.council.hasProposals();
|
||||
* console.log(exists);
|
||||
* ```
|
||||
*/
|
||||
export const hasProposals = /*#__PURE__*/ collectiveHasProposals('council');
|
||||
/**
|
||||
* @name proposal
|
||||
* @description Retrieves details of a specific proposal in the "councilMotion" collective by its hash.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const proposalDetails = await api.derive.council.proposal(PROPOSAL_HASH);
|
||||
* console.log(proposalDetails);
|
||||
* ```
|
||||
*/
|
||||
export const proposal = /*#__PURE__*/ collectiveProposal('council');
|
||||
/**
|
||||
* @name proposalCount
|
||||
* @description Retrieves the total number of proposals in the "council" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const count = await api.derive.council.proposalCount();
|
||||
* console.log(`Amount of proposals: ${count}`);
|
||||
* ```
|
||||
*/
|
||||
export const proposalCount = /*#__PURE__*/ collectiveProposalCount('council');
|
||||
/**
|
||||
* @name proposalHashes
|
||||
* @description Retrieves an array of hashes for all active proposals in the "council" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const hashes = await api.derive.council.proposalHashes();
|
||||
* console.log(`Proposals ${JSON.stringify(hashes)}`);
|
||||
* ```
|
||||
*/
|
||||
export const proposalHashes = /*#__PURE__*/ collectiveProposalHashes('council');
|
||||
/**
|
||||
* @name proposals
|
||||
* @description Retrieves a list of all active proposals in the "council" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const proposals = await api.derive.council.proposals();
|
||||
* console.log(proposals);
|
||||
* ```
|
||||
*/
|
||||
export const proposals = /*#__PURE__*/ collectiveProposals('council');
|
||||
|
||||
/**
|
||||
* @name prime
|
||||
* @description Retrieves the prime member of the "council" collective, if one exists.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const primeMember = await api.derive.council.prime();
|
||||
* console.log(primeMember);
|
||||
* ```
|
||||
*/
|
||||
export const prime = /*#__PURE__*/ collectivePrime('council');
|
||||
|
||||
@@ -76,6 +76,14 @@ function retrieveCurrent (elections: DeriveApi['query']['elections']): Observabl
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name votes
|
||||
* @description Retrieves the council election votes for all participants.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const votes = await api.derive.council.votes();
|
||||
* ```
|
||||
*/
|
||||
export function votes (instanceId: string, api: DeriveApi): () => Observable<DeriveCouncilVotes> {
|
||||
const elections = api.query.elections || api.query['phragmenElection'] || api.query['electionsPhragmen'];
|
||||
|
||||
|
||||
@@ -9,6 +9,18 @@ import { map } from 'rxjs';
|
||||
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name votesOf
|
||||
* @description Retrieves the council votes associated with a given account.
|
||||
* @returns The stake and the list of candidates the account has voted for.
|
||||
* @param {string | Uint8Array | AccountId} accountId The accountId to retrieve votes for.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const accountId = "5Gw3s7qQ9Z..."; // Replace with a valid account ID
|
||||
* const votes = await api.derive.council.votesOf(accountId);
|
||||
* console.log("Account votes:", votes);
|
||||
* ```
|
||||
*/
|
||||
export function votesOf (instanceId: string, api: DeriveApi): (accountId: string | Uint8Array | AccountId) => Observable<DeriveCouncilVote> {
|
||||
return memo(instanceId, (accountId: string | Uint8Array | AccountId): Observable<DeriveCouncilVote> =>
|
||||
api.derive.council.votes().pipe(
|
||||
|
||||
@@ -33,6 +33,17 @@ function createChildKey (info: AllInfo): string {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name childKey
|
||||
* @description Retrieves the child storage key for a given parachain’s crowdloan contributions.
|
||||
* This key is used to access contribution data stored in a separate child trie of the blockchain’s state.
|
||||
* @param {string | number | BN} paraId The parachain ID for which contributions are being queried.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const childKey = await api.derive.crowdloan.childKey(3369);
|
||||
* console.log("Child Key:", childKey);
|
||||
* ```
|
||||
*/
|
||||
export function childKey (instanceId: string, api: DeriveApi): (paraId: string | number | BN) => Observable<string | null> {
|
||||
return memo(instanceId, (paraId: string | number | BN): Observable<string | null> =>
|
||||
api.query['crowdloan']['funds']<Option<PolkadotRuntimeCommonCrowdloanFundInfo>>(paraId).pipe(
|
||||
|
||||
@@ -119,6 +119,16 @@ function _contributions (api: DeriveApi, paraId: string | number | BN, childKey:
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name contributions
|
||||
* @description Retrieves all contributions for a given parachain crowdloan.
|
||||
* @param {string | number | BN} paraId The parachain ID for which contributions are being queried.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const contributions = await api.derive.crowdloan.contributions(3369);
|
||||
* console.log("Contributions:", contributions);
|
||||
* ```
|
||||
*/
|
||||
export function contributions (instanceId: string, api: DeriveApi): (paraId: string | number | BN) => Observable<DeriveContributions> {
|
||||
return memo(instanceId, (paraId: string | number | BN): Observable<DeriveContributions> =>
|
||||
api.derive.crowdloan.childKey(paraId).pipe(
|
||||
|
||||
@@ -57,6 +57,17 @@ function _contributions (api: DeriveApi, paraId: string | number | BN, childKey:
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name ownContributions
|
||||
* @description Retrieves the contribution amounts made by specific accounts (`keys`) to a given parachain crowdloan (`paraId`).
|
||||
* @param {string | number | BN} paraId The parachain ID for which contributions are being queried.
|
||||
* @param {string[]} keys An array of account addresses whose contributions are to be fetched.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const contributions = await api.derive.crowdloan.ownContributions(2000, ['5Ff...PqV', '5Gg...XyZ']);
|
||||
* console.log("Own Contributions:", contributions);
|
||||
* ```
|
||||
*/
|
||||
export function ownContributions (instanceId: string, api: DeriveApi): (paraId: string | number | BN, keys: string[]) => Observable<DeriveOwnContributions> {
|
||||
return memo(instanceId, (paraId: string | number | BN, keys: string[]): Observable<DeriveOwnContributions> =>
|
||||
api.derive.crowdloan.childKey(paraId).pipe(
|
||||
|
||||
@@ -138,6 +138,15 @@ function queryScheduler (api: DeriveApi): Observable<DeriveDispatch[]> {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name dispatchQueue
|
||||
* @description Retrieves the list of scheduled or pending dispatches in the governance system.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const queue = await api.derive.democracy.dispatchQueue();
|
||||
* console.log("Dispatch Queue:", queue);
|
||||
* ```
|
||||
*/
|
||||
export function dispatchQueue (instanceId: string, api: DeriveApi): () => Observable<DeriveDispatch[]> {
|
||||
return memo(instanceId, (): Observable<DeriveDispatch[]> =>
|
||||
isFunction(api.query.scheduler?.agenda)
|
||||
|
||||
@@ -87,6 +87,16 @@ function directLocks (api: DeriveApi, { votes }: VotingDirect): Observable<Deriv
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name locks
|
||||
* @description Retrieves the democracy voting locks for a given account.
|
||||
* @param { string | AccountId } accountId The accountId for which to retrieve democracy voting locks.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const locks = await api.derive.democracy.locks('5FfFjX...'); // Replace with an actual accountId
|
||||
* console.log("Democracy Locks:", locks);
|
||||
* ```
|
||||
*/
|
||||
export function locks (instanceId: string, api: DeriveApi): (accountId: string | AccountId) => Observable<DeriveDemocracyLock[]> {
|
||||
return memo(instanceId, (accountId: string | AccountId): Observable<DeriveDemocracyLock[]> =>
|
||||
api.query.democracy.votingOf
|
||||
|
||||
@@ -29,6 +29,15 @@ function withImage (api: DeriveApi, nextOpt: Option<ITuple<[H256 | FrameSupportP
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name nextExternal
|
||||
* @description Retrieves the next external proposal that is scheduled for a referendum.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const nextExternal = await api.derive.democracy.nextExternal();
|
||||
* console.log("Next external proposal:", nextExternal);
|
||||
* ```
|
||||
*/
|
||||
export function nextExternal (instanceId: string, api: DeriveApi): () => Observable<DeriveProposalExternal | null> {
|
||||
return memo(instanceId, (): Observable<DeriveProposalExternal | null> =>
|
||||
api.query.democracy?.nextExternal
|
||||
|
||||
@@ -135,6 +135,15 @@ function getImages (api: DeriveApi, bounded: (FrameSupportPreimagesBounded | Uin
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name preimages
|
||||
* @description Retrieves the full details (preimages) of governance proposals using their on-chain hashes.
|
||||
* @param { (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[] } hashes An array of hashes representing governance proposals.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const preimages = await api.derive.democracy.preimages([HASH1, HASH2]);
|
||||
* ```
|
||||
*/
|
||||
export function preimages (instanceId: string, api: DeriveApi): (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]) => Observable<(DeriveProposalImage | undefined)[]> {
|
||||
return memo(instanceId, (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]): Observable<(DeriveProposalImage | undefined)[]> =>
|
||||
hashes.length
|
||||
@@ -147,6 +156,15 @@ export function preimages (instanceId: string, api: DeriveApi): (hashes: (Hash |
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name preimage
|
||||
* @description Retrieves the full details (preimage) of a governance proposal using its on-chain hash.
|
||||
* @param { Hash | Uint8Array | string | FrameSupportPreimagesBounded } hash Hash that represents governance proposals.
|
||||
* * @example
|
||||
* ```javascript
|
||||
* const preimage = await api.derive.democracy.preimage(HASH);
|
||||
* ```
|
||||
*/
|
||||
export const preimage = /*#__PURE__*/ firstMemo(
|
||||
(api: DeriveApi, hash: Hash | Uint8Array | string | FrameSupportPreimagesBounded) =>
|
||||
api.derive.democracy.preimages([hash])
|
||||
|
||||
@@ -48,6 +48,15 @@ function parse ([proposals, images, optDepositors]: Result): DeriveProposal[] {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @name proposals
|
||||
* @description Retrieves the list of active public proposals in the democracy module, along with their associated preimage data and deposit information.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const proposals = await api.derive.democracy.proposals();
|
||||
* console.log("proposals:", proposals);
|
||||
* ```
|
||||
*/
|
||||
export function proposals (instanceId: string, api: DeriveApi): () => Observable<DeriveProposal[]> {
|
||||
return memo(instanceId, (): Observable<DeriveProposal[]> =>
|
||||
isFunction(api.query.democracy?.publicProps)
|
||||
|
||||
@@ -10,6 +10,14 @@ import { map, of } from 'rxjs';
|
||||
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name referendumIds
|
||||
* @description Retrieves an array of active referendum IDs.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const referendums = await api.derive.democracy.referendumIds();
|
||||
* ```
|
||||
*/
|
||||
export function referendumIds (instanceId: string, api: DeriveApi): () => Observable<BN[]> {
|
||||
return memo(instanceId, (): Observable<BN[]> =>
|
||||
api.query.democracy?.lowestUnbaked
|
||||
|
||||
@@ -10,6 +10,14 @@ import { objectSpread } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name referendums
|
||||
* @description Retrieves information about all active referendums, including their details and associated votes.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const referendums = await api.derive.democracy.referendums();
|
||||
* ```
|
||||
*/
|
||||
export function referendums (instanceId: string, api: DeriveApi): () => Observable<DeriveReferendumExt[]> {
|
||||
return memo(instanceId, (): Observable<DeriveReferendumExt[]> =>
|
||||
api.derive.democracy.referendumsActive().pipe(
|
||||
|
||||
@@ -8,6 +8,15 @@ import { of, switchMap } from 'rxjs';
|
||||
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name referendumsActive
|
||||
* @description Retrieves information about active referendums.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const referendums = await api.derive.democracy.referendumsActive();
|
||||
* console.log("Active Referendums:", referendums);
|
||||
* ```
|
||||
*/
|
||||
export function referendumsActive (instanceId: string, api: DeriveApi): () => Observable<DeriveReferendum[]> {
|
||||
return memo(instanceId, (): Observable<DeriveReferendum[]> =>
|
||||
api.derive.democracy.referendumIds().pipe(
|
||||
|
||||
@@ -11,6 +11,15 @@ import { memo } from '../util/index.js';
|
||||
|
||||
type ReferendumInfoFinished = PalletDemocracyReferendumInfo['asFinished'];
|
||||
|
||||
/**
|
||||
* @name referendumsFinished
|
||||
* @description Retrieves information about finished referendums.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const referendums = await api.derive.democracy.referendumsFinished();
|
||||
* console.log("Finished Referendums:", referendums);
|
||||
* ```
|
||||
*/
|
||||
export function referendumsFinished (instanceId: string, api: DeriveApi): () => Observable<ReferendumInfoFinished[]> {
|
||||
return memo(instanceId, (): Observable<ReferendumInfoFinished[]> =>
|
||||
api.derive.democracy.referendumIds().pipe(
|
||||
|
||||
@@ -148,6 +148,19 @@ export function _referendumInfo (instanceId: string, api: DeriveApi): (index: BN
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @name referendumsInfo
|
||||
* @description Retrieves information about multiple referendums by their IDs.
|
||||
* @param {BN[]} ids An array of referendum IDs to query.
|
||||
* @example
|
||||
* ```javascript
|
||||
* import { BN } from "@polkadot/util";
|
||||
*
|
||||
* const referendumIds = [new BN(1)];
|
||||
* const referendums = await api.derive.democracy.referendumsInfo(referendumIds);
|
||||
* console.log("Referendums Info:", referendums);
|
||||
* ```
|
||||
*/
|
||||
export function referendumsInfo (instanceId: string, api: DeriveApi): (ids: BN[]) => Observable<DeriveReferendum[]> {
|
||||
return memo(instanceId, (ids: BN[]): Observable<DeriveReferendum[]> =>
|
||||
ids.length
|
||||
|
||||
@@ -11,6 +11,15 @@ import { bnSqrt } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name sqrtElectorate
|
||||
* @description Computes the square root of the total token issuance in the network.
|
||||
* @example
|
||||
* ```javascript
|
||||
* let sqrtElectorate = await api.derive.democracy.sqrtElectorate();
|
||||
* console.log("Square root of token issuance:", sqrtElectorate);
|
||||
* ```
|
||||
*/
|
||||
export function sqrtElectorate (instanceId: string, api: DeriveApi): () => Observable<BN> {
|
||||
return memo(instanceId, (): Observable<BN> =>
|
||||
api.query.balances.totalIssuance().pipe(
|
||||
|
||||
@@ -94,11 +94,8 @@ function queryCouncil (api: DeriveApi, council: string): Observable<[AccountId32
|
||||
|
||||
/**
|
||||
* @name info
|
||||
* @returns An object containing the combined results of the storage queries for
|
||||
* all relevant election module properties.
|
||||
* @description An object containing the combined results of the storage queries for all relevant election module properties.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* api.derive.elections.info(({ members, candidates }) => {
|
||||
* console.log(`There are currently ${members.length} council members and ${candidates.length} prospective council candidates.`);
|
||||
|
||||
@@ -35,7 +35,14 @@ function mapResult ([result, validators, heartbeats, numBlocks]: Result): Derive
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Return a boolean array indicating whether the passed accounts had received heartbeats in the current session
|
||||
* @name receivedHeartbeats
|
||||
* @description Return a boolean array indicating whether the passed accounts had received heartbeats in the current session.
|
||||
* @example
|
||||
* ```javascript
|
||||
* let unsub = await api.derive.imOnline.receivedHeartbeats((heartbeat) => {
|
||||
* console.log(heartbeat);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function receivedHeartbeats (instanceId: string, api: DeriveApi): () => Observable<DeriveHeartbeats> {
|
||||
return memo(instanceId, (): Observable<DeriveHeartbeats> =>
|
||||
|
||||
@@ -3,12 +3,74 @@
|
||||
|
||||
import { hasProposals as collectiveHasProposals, members as collectiveMembers, prime as collectivePrime, proposal as collectiveProposal, proposalCount as collectiveProposalCount, proposalHashes as collectiveProposalHashes, proposals as collectiveProposals } from '../collective/index.js';
|
||||
|
||||
/**
|
||||
* @name members
|
||||
* @description Retrieves the list of members in the "membership" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const members = await api.derive.membership.members();
|
||||
* console.log(`Members: ${JSON.stringify(members)});
|
||||
* ```
|
||||
*/
|
||||
export const members = /*#__PURE__*/ collectiveMembers('membership');
|
||||
|
||||
/**
|
||||
* @name hasProposals
|
||||
* @description Checks if there are any active proposals in the "membership" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const exists = await api.derive.membership.hasProposals();
|
||||
* console.log(exists);
|
||||
* ```
|
||||
*/
|
||||
export const hasProposals = /*#__PURE__*/ collectiveHasProposals('membership');
|
||||
/**
|
||||
* @name proposal
|
||||
* @description Retrieves details of a specific proposal in the "membership" collective by its hash.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const proposalDetails = await api.derive.membership.proposal(PROPOSAL_HASH);
|
||||
* console.log(proposalDetails);
|
||||
* ```
|
||||
*/
|
||||
export const proposal = /*#__PURE__*/ collectiveProposal('membership');
|
||||
/**
|
||||
* @name proposalCount
|
||||
* @description Retrieves the total number of proposals in the "membership" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const count = await api.derive.membership.proposalCount();
|
||||
* console.log(`Amount of proposals: ${count}`);
|
||||
* ```
|
||||
*/
|
||||
export const proposalCount = /*#__PURE__*/ collectiveProposalCount('membership');
|
||||
/**
|
||||
* @name proposalHashes
|
||||
* @description Retrieves an array of hashes for all active proposals in the "membership" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const hashes = await api.derive.membership.proposalHashes();
|
||||
* console.log(`Proposals ${JSON.stringify(hashes)}`);
|
||||
* ```
|
||||
*/
|
||||
export const proposalHashes = /*#__PURE__*/ collectiveProposalHashes('membership');
|
||||
/**
|
||||
* @name proposals
|
||||
* @description Retrieves a list of all active proposals in the "membership" collective.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const proposals = await api.derive.membership.proposals();
|
||||
* console.log(proposals);
|
||||
* ```
|
||||
*/
|
||||
export const proposals = /*#__PURE__*/ collectiveProposals('membership');
|
||||
|
||||
/**
|
||||
* @name prime
|
||||
* @description Retrieves the prime member of the "membership" collective, if one exists.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const primeMember = await api.derive.membership.prime();
|
||||
* console.log(primeMember);
|
||||
* ```
|
||||
*/
|
||||
export const prime = /*#__PURE__*/ collectivePrime('membership');
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '15.5.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '15.9.2' };
|
||||
|
||||
@@ -73,6 +73,21 @@ function parse (id: ParaId, [active, retryQueue, selectedThreads, didUpdate, inf
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @name info
|
||||
* @param {ParaId | number} id A unique numeric (non-negative integer) identifier for a parachain.
|
||||
* @description Retrieves detailed information about a specific parachain.
|
||||
* @example
|
||||
* ```javascript
|
||||
* await api.derive.parachains.info(1000, (info) => {
|
||||
* if (info) {
|
||||
* console.log(`Parachain ${info.id.toString()} is active: ${info.active}`);
|
||||
* } else {
|
||||
* console.log("Parachain information not available.");
|
||||
* }
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function info (instanceId: string, api: DeriveApi): (id: ParaId | number) => Observable<DeriveParachainFull | null> {
|
||||
return memo(instanceId, (id: ParaId | number): Observable<DeriveParachainFull | null> =>
|
||||
api.query['registrar'] && api.query['parachains']
|
||||
|
||||
@@ -31,6 +31,18 @@ function parse ([ids, didUpdate, relayDispatchQueueSizes, infos, pendingSwaps]:
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* @name overview
|
||||
* @description Retrieves an overview of all registered parachains.
|
||||
* @example
|
||||
* ```javascript
|
||||
* await api.derive.parachains.overview((overview) => {
|
||||
* parachains.forEach(parachain => {
|
||||
* console.log(`Parachain ${parachain.id.toString()} is registered.`);
|
||||
* });
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function overview (instanceId: string, api: DeriveApi): () => Observable<DeriveParachain[]> {
|
||||
return memo(instanceId, (): Observable<DeriveParachain[]> =>
|
||||
api.query['registrar']?.['parachains'] && api.query['parachains']
|
||||
|
||||
@@ -67,6 +67,18 @@ function empty (api: DeriveApi): Observable<DeriveSessionIndexes> {
|
||||
]));
|
||||
}
|
||||
|
||||
/**
|
||||
* @name indexes
|
||||
* @description Retrieves session-related index data, adapting to whether
|
||||
* the chain has staking enabled.
|
||||
* @example
|
||||
* ```javascript
|
||||
* api.derive.session.indexes((indexes) => {
|
||||
* console.log(`Current session index: ${indexes.currentIndex}`);
|
||||
* console.log(`Validator count: ${indexes.validatorCount}`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function indexes (instanceId: string, api: DeriveApi): () => Observable<DeriveSessionIndexes> {
|
||||
return memo(instanceId, (): Observable<DeriveSessionIndexes> =>
|
||||
api.query.session
|
||||
|
||||
@@ -11,7 +11,14 @@ import { objectSpread } from '@polkadot/util';
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @description Retrieves all the session and era query and calculates specific values on it as the length of the session and eras
|
||||
* @name info
|
||||
* @description Retrieves all the session and era query and calculates specific values on it as the length of the session and eras.
|
||||
* @example
|
||||
* ```javascript
|
||||
* api.derive.session.info((info) => {
|
||||
* console.log(`Session info ${JSON.stringify(info)}`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function info (instanceId: string, api: DeriveApi): () => Observable<DeriveSessionInfo> {
|
||||
return memo(instanceId, (): Observable<DeriveSessionInfo> =>
|
||||
|
||||
@@ -74,7 +74,14 @@ function queryBabe (api: DeriveApi): Observable<[DeriveSessionInfo, ResultSlotsF
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Retrieves all the session and era query and calculates specific values on it as the length of the session and eras
|
||||
* @name progress
|
||||
* @description Retrieves session information and progress.
|
||||
* @example
|
||||
* ```javascript
|
||||
* api.derive.session.progress((progress) => {
|
||||
* console.log(`Session progress ${JSON.stringify(progress)}`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function progress (instanceId: string, api: DeriveApi): () => Observable<DeriveSessionProgress> {
|
||||
return memo(instanceId, (): Observable<DeriveSessionProgress> =>
|
||||
@@ -88,6 +95,36 @@ export function progress (instanceId: string, api: DeriveApi): () => Observable<
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name eraLenght
|
||||
* @description Retrieves the total length of the current era.
|
||||
* @example
|
||||
* ```javascript
|
||||
* api.derive.session.eraLength((length) => {
|
||||
* console.log(`Current era length: ${length} sessions`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export const eraLength = /*#__PURE__*/ withProgressField('eraLength');
|
||||
/**
|
||||
* @name eraProgress
|
||||
* @description Retrieves the progress of the current era.
|
||||
* @example
|
||||
* ```javascript
|
||||
* api.derive.session.eraProgress((progress) => {
|
||||
* console.log(`Current era progress: ${progress} sessions`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export const eraProgress = /*#__PURE__*/ withProgressField('eraProgress');
|
||||
/**
|
||||
* @name sessionProgress
|
||||
* @description Retrieves the progress of the current session.
|
||||
* @example
|
||||
* ```javascript
|
||||
* api.derive.session.sessionProgress((progress) => {
|
||||
* console.log(`Current session progress: ${progress} slots`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export const sessionProgress = /*#__PURE__*/ withProgressField('sessionProgress');
|
||||
|
||||
@@ -54,7 +54,13 @@ function getCurr (api: DeriveApi) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Get the candidate info for a society
|
||||
* @name candidate
|
||||
* @description Retrieves the list of candidates for the society module.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const societyCandidates = await api.derive.society.candidates();
|
||||
* console.log(societyCandidates);
|
||||
* ```
|
||||
*/
|
||||
export function candidates (instanceId: string, api: DeriveApi): () => Observable<DeriveSocietyCandidate[]> {
|
||||
return memo(instanceId, (): Observable<DeriveSocietyCandidate[]> =>
|
||||
|
||||
@@ -14,7 +14,13 @@ import { memo } from '../util/index.js';
|
||||
type Result = [Vec<PalletSocietyBid>, Option<AccountId> | undefined, Option<AccountId>, Option<AccountId>, u32 | undefined, BalanceOf]
|
||||
|
||||
/**
|
||||
* @description Get the overall info for a society
|
||||
* @name info
|
||||
* @description Get the overall info for a society.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const societyInfo = await api.derive.society.candidates();
|
||||
* console.log(societyInfo);
|
||||
* ```
|
||||
*/
|
||||
export function info (instanceId: string, api: DeriveApi): () => Observable<DeriveSociety> {
|
||||
return memo(instanceId, (): Observable<DeriveSociety> =>
|
||||
|
||||
@@ -10,7 +10,14 @@ import { map } from 'rxjs';
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @description Get the member info for a society
|
||||
* @name member
|
||||
* @description Get the member info for a society.
|
||||
* @param { AccountId } accountId
|
||||
* @example
|
||||
* ```javascript
|
||||
* const member = await api.derive.society.member(ALICE);
|
||||
* console.log(member);
|
||||
* ```
|
||||
*/
|
||||
export function member (instanceId: string, api: DeriveApi): (accountId: AccountId) => Observable<DeriveSocietyMember> {
|
||||
return memo(instanceId, (accountId: AccountId): Observable<DeriveSocietyMember> =>
|
||||
|
||||
@@ -82,7 +82,13 @@ export function _members (instanceId: string, api: DeriveApi): (accountIds: Acco
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Get the member info for a society
|
||||
* @name members
|
||||
* @description Get the society members.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const members = await api.derive.society.members();
|
||||
* console.log(members);
|
||||
* ```
|
||||
*/
|
||||
export function members (instanceId: string, api: DeriveApi): () => Observable<DeriveSocietyMember[]> {
|
||||
return memo(instanceId, (): Observable<DeriveSocietyMember[]> =>
|
||||
|
||||
@@ -64,7 +64,17 @@ function parseResult (api: DeriveApi, sessionInfo: DeriveSessionInfo, keys: Deri
|
||||
}
|
||||
|
||||
/**
|
||||
* @name accounts
|
||||
* @param {(Uint8Array | string)[]} accountIds List of account stashes
|
||||
* @param {StakingQueryFlags} opts optional filtering flag
|
||||
* @description From a list of stashes, fill in all the relevant staking details
|
||||
* @example
|
||||
* ```javascript
|
||||
* const accounts = await api.derive.staking.accounts([
|
||||
* "149B17nn7zVL4SkLSNmANupEkGexUBAxVrdk4bbWFZYibkFc",
|
||||
* ]);
|
||||
* console.log("First account staking info:", accounts[0]);
|
||||
* ```
|
||||
*/
|
||||
export function accounts (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], opts?: StakingQueryFlags) => Observable<DeriveStakingAccount[]> {
|
||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], opts: StakingQueryFlags = QUERY_OPTS): Observable<DeriveStakingAccount[]> =>
|
||||
@@ -84,7 +94,17 @@ export function accounts (instanceId: string, api: DeriveApi): (accountIds: (Uin
|
||||
}
|
||||
|
||||
/**
|
||||
* @description From a stash, retrieve the controllerId and fill in all the relevant staking details
|
||||
* @name account
|
||||
* @param {(Uint8Array | string)} accountId AccountId of the stash.
|
||||
* @param {StakingQueryFlags} opts (Optional) filtering flag.
|
||||
* @description From a stash, retrieve the controllerId and fill in all the relevant staking details.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const accountStakingData = await api.derive.staking.account(
|
||||
* "149B17nn7zVL4SkLSNmANupEkGexUBAxVrdk4bbWFZYibkFc"
|
||||
* );
|
||||
* console.log(accountStakingData);
|
||||
* ```
|
||||
*/
|
||||
export const account = /*#__PURE__*/ firstMemo(
|
||||
(api: DeriveApi, accountId: Uint8Array | string, opts?: StakingQueryFlags) =>
|
||||
|
||||
@@ -10,7 +10,13 @@ import { switchMap } from 'rxjs';
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @description Retrieve the staking overview, including elected and points earned
|
||||
* @name currentPoints
|
||||
* @description Retrieve the staking overview, including elected and points earned.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const currentPoints = await api.derive.staking.currentPoints();
|
||||
* console.log(currentPoints.toHuman());
|
||||
* ```
|
||||
*/
|
||||
export function currentPoints (instanceId: string, api: DeriveApi): () => Observable<PalletStakingEraRewardPoints> {
|
||||
return memo(instanceId, (): Observable<PalletStakingEraRewardPoints> =>
|
||||
|
||||
@@ -17,6 +17,26 @@ function combineAccounts (nextElected: AccountId[], validators: AccountId[]): Ac
|
||||
return arrayFlatten([nextElected, validators.filter((v) => !nextElected.find((n) => n.eq(v)))]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name electedInfo
|
||||
* @param {StakingQueryFlags} flags? (Optional) Query flags to filter the staking data.
|
||||
* @param {number} page? (Optional) The page index for paginated results.
|
||||
* @description Retrieves detailed staking information about the next elected validators and their associated staking data.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const { nextElected, validators, info } =
|
||||
* await api.derive.staking.electedInfo();
|
||||
* console.log(
|
||||
* "Next Elected Validators:",
|
||||
* nextElected.map((acc) => acc.toString())
|
||||
* );
|
||||
* console.log(
|
||||
* "Current Validators:",
|
||||
* validators.map((acc) => acc.toString())
|
||||
* );
|
||||
* console.log("Validator Staking Info:", info);
|
||||
* ```
|
||||
*/
|
||||
export function electedInfo (instanceId: string, api: DeriveApi): (flags?: StakingQueryFlags, page?: number) => Observable<DeriveStakingElected> {
|
||||
return memo(instanceId, (flags: StakingQueryFlags = DEFAULT_FLAGS, page = 0): Observable<DeriveStakingElected> =>
|
||||
api.derive.staking.validators().pipe(
|
||||
|
||||
@@ -81,6 +81,25 @@ export function _eraExposure (instanceId: string, api: DeriveApi): (era: EraInde
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @name eraExposure
|
||||
* @description Retrieves the staking exposure (nominators and total stake) for a specific era.
|
||||
* @param {EraIndex} eras The staking era to query.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const era = api.createType("EraIndex", 1000);
|
||||
* const exposure = await api.derive.staking.eraExposure(era);
|
||||
* ```
|
||||
*/
|
||||
export const eraExposure = /*#__PURE__*/ singleEra('_eraExposure');
|
||||
export const _erasExposure = /*#__PURE__*/ combineEras('_eraExposure');
|
||||
/**
|
||||
* @name erasExposure
|
||||
* @description Retrieves staking exposure details for multiple past eras.
|
||||
* @param {boolean} withActive? (Optional) Whether to include the active era in the result.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const exposure = await api.derive.staking.erasExposure(true);
|
||||
* ```
|
||||
*/
|
||||
export const erasExposure = /*#__PURE__*/ erasHistoricApply('_erasExposure');
|
||||
|
||||
@@ -13,6 +13,10 @@ import { BN_ONE, BN_ZERO } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @name erasHistoric
|
||||
* @param {boolean} withActive? (Optional) Whether to include the active era in the result.
|
||||
*/
|
||||
export function erasHistoric (instanceId: string, api: DeriveApi): (withActive?: boolean) => Observable<EraIndex[]> {
|
||||
return memo(instanceId, (withActive?: boolean): Observable<EraIndex[]> =>
|
||||
combineLatest([
|
||||
|
||||
@@ -51,4 +51,17 @@ export function _erasPoints (instanceId: string, api: DeriveApi): (eras: EraInde
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @name erasPoints
|
||||
* @description Retrieves historical era points with its validators.
|
||||
* @param {boolean} withActive? (Optional) Whether to include the active era in the result.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const points = await api.derive.staking.erasPoints(true);
|
||||
* console.log(
|
||||
* "Validator points:",
|
||||
* points.map(({ era, eraPoints }) => `Era: ${era}, points ${eraPoints}`)
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export const erasPoints = /*#__PURE__*/ erasHistoricApply('_erasPoints');
|
||||
|
||||
@@ -37,6 +37,27 @@ export function _eraPrefs (instanceId: string, api: DeriveApi): (era: EraIndex,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @name eraPrefs
|
||||
* @description Retrieves the validators commission preferences for a given staking era.
|
||||
* @param {EraIndex} era The staking era to query.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const era = api.createType("EraIndex", 1000);
|
||||
* const prefs = await api.derive.staking.eraPrefs(era);
|
||||
* console.log(JSON.stringify(prefs));
|
||||
* ```
|
||||
*/
|
||||
export const eraPrefs = /*#__PURE__*/ singleEra('_eraPrefs');
|
||||
export const _erasPrefs = /*#__PURE__*/ combineEras('_eraPrefs');
|
||||
|
||||
/**
|
||||
* @name erasPrefs
|
||||
* @description Retrieves validators commission preferences for multiple past staking eras
|
||||
* @param {boolean} withActive? (Optional) Whether to include the active era in the result.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const prefs = await api.derive.staking.erasPrefs(true);
|
||||
* ```
|
||||
*/
|
||||
export const erasPrefs = /*#__PURE__*/ erasHistoricApply('_erasPrefs');
|
||||
|
||||
@@ -40,4 +40,13 @@ export function _erasRewards (instanceId: string, api: DeriveApi): (eras: EraInd
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @name erasRewards
|
||||
* @description Retrieves rewards for historical eras.
|
||||
* @param {boolean} withActive? (Optional) Whether to include the active era in the result.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const rewards = await api.derive.staking.erasRewards(true);
|
||||
* ```
|
||||
*/
|
||||
export const erasRewards = /*#__PURE__*/ erasHistoricApply('_erasRewards');
|
||||
|
||||
@@ -45,6 +45,25 @@ export function _eraSlashes (instanceId: string, api: DeriveApi): (era: EraIndex
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @name eraSlashes
|
||||
* @description Retrieves the slashes for a specific staking era.
|
||||
* @param {EraIndex} eras The staking era to query.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const era = api.createType("EraIndex", 1000);
|
||||
* const slashes = await api.derive.staking.eraSlashes(era);
|
||||
* ```
|
||||
*/
|
||||
export const eraSlashes = /*#__PURE__*/ singleEra('_eraSlashes');
|
||||
export const _erasSlashes = /*#__PURE__*/ combineEras('_eraSlashes');
|
||||
/**
|
||||
* @name erasSlashes
|
||||
* @description Retrieves slashes for historical eras.
|
||||
* @param {boolean} withActive? (Optional) Whether to include the active era in the result.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const slashes = await api.derive.staking.erasSlashes(true);
|
||||
* ```
|
||||
*/
|
||||
export const erasSlashes = /*#__PURE__*/ erasHistoricApply('_erasSlashes');
|
||||
|
||||
@@ -26,11 +26,41 @@ function extractsIds (stashId: Uint8Array | string, queuedKeys: [AccountId, Kitc
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @name keys
|
||||
* @param { Uint8Array | string } stashId The stash account ID whose session keys are to be retrieved.
|
||||
* @description Retrieves the session keys associated with a given stash account.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const keys = await api.derive.staking.keys(
|
||||
* ALICE
|
||||
* );
|
||||
* console.log(
|
||||
* "Session keys:",
|
||||
* keys.sessionIds.map((key) => `Key: ${key}`)
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export const keys = /*#__PURE__*/ firstMemo(
|
||||
(api: DeriveApi, stashId: Uint8Array | string) =>
|
||||
api.derive.staking.keysMulti([stashId])
|
||||
);
|
||||
|
||||
/**
|
||||
* @name keysMulti
|
||||
* @description Retrieves session keys for multiple stash accounts.
|
||||
* @param { (Uint8Array | string)[] } stashIds Array of stash account IDs.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const keysMulti = await api.derive.staking.keysMulti([ ALICE, BOB ]);
|
||||
* keysMulti.forEach((keys) => {
|
||||
* console.log(
|
||||
* "Session keys:",
|
||||
* keys.sessionIds.map((key) => `Key: ${key}`)
|
||||
* );
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function keysMulti (instanceId: string, api: DeriveApi): (stashIds: (Uint8Array | string)[]) => Observable<DeriveStakingKeys[]> {
|
||||
return memo(instanceId, (stashIds: (Uint8Array | string)[]): Observable<DeriveStakingKeys[]> =>
|
||||
stashIds.length
|
||||
|
||||
@@ -11,7 +11,20 @@ import { objectSpread } from '@polkadot/util';
|
||||
import { memo } from '../util/index.js';
|
||||
|
||||
/**
|
||||
* @description Retrieve the staking overview, including elected and points earned
|
||||
* @name overview
|
||||
* @description Retrieve the staking overview, including elected validators and points earned.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const {
|
||||
* activeEra,
|
||||
* activeEraStart,
|
||||
* currentEra,
|
||||
* currentIndex,
|
||||
* nextElected,
|
||||
* validatorCount,
|
||||
* validators,
|
||||
* } = await api.derive.staking.overview();
|
||||
* ```
|
||||
*/
|
||||
export function overview (instanceId: string, api: DeriveApi): () => Observable<DeriveStakingOverview> {
|
||||
return memo(instanceId, (): Observable<DeriveStakingOverview> =>
|
||||
|
||||
@@ -46,9 +46,38 @@ export function _ownExposures (instanceId: string, api: DeriveApi): (accountId:
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name ownExposure
|
||||
* @description Retrieves the staking exposure of a validator for a specific era, including their own stake.
|
||||
* @param { Uint8Array | string } accountId The validator stash account.
|
||||
* @param {EraIndex} era The staking era to query.
|
||||
* @param { u32 | AnyNumber } page? (Optional) The pagination index.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const era = api.createType("EraIndex", 1000);
|
||||
* const exposure = await api.derive.staking.ownExposure(
|
||||
* "11VR4pF6c7kfBhfmuwwjWY3FodeYBKWx7ix2rsRCU2q6hqJ",
|
||||
* era
|
||||
* );
|
||||
* console.log(JSON.stringify(exposure));
|
||||
* ```
|
||||
*/
|
||||
export const ownExposure = /*#__PURE__*/ firstMemo(
|
||||
(api: DeriveApi, accountId: Uint8Array | string, era: EraIndex, page?: u32 | AnyNumber) =>
|
||||
api.derive.staking._ownExposures(accountId, [era], true, page || 0)
|
||||
);
|
||||
|
||||
/**
|
||||
* @name ownExposures
|
||||
* @description Retrieves staking exposures for a validator across multiple historical eras.
|
||||
* @param { Uint8Array | string } accountId The validator stash account.
|
||||
* @param { boolean } withActive Whether to include the active era.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const exposures = await api.derive.staking.ownExposures(
|
||||
* ALICE,
|
||||
* true
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export const ownExposures = /*#__PURE__*/ erasHistoricApplyAccount('_ownExposures');
|
||||
|
||||
@@ -31,9 +31,38 @@ export function _ownSlashes (instanceId: string, api: DeriveApi): (accountId: Ui
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name ownSlash
|
||||
* @description Retrieves the slashes applied to a specific account in a given era.
|
||||
* @param { Uint8Array | string } accountId The validator stash account.
|
||||
* @param {EraIndex} era The staking era to query.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const era = api.createType("EraIndex", 1000);
|
||||
* const slashedAmount = await api.derive.staking.ownSlash(
|
||||
* ALICE,
|
||||
* era
|
||||
* );
|
||||
* console.log(`Era: ${slashedAmount.era}, total ${slashedAmount.total}`);
|
||||
* ```
|
||||
*/
|
||||
export const ownSlash = /*#__PURE__*/ firstMemo(
|
||||
(api: DeriveApi, accountId: Uint8Array | string, era: EraIndex) =>
|
||||
api.derive.staking._ownSlashes(accountId, [era], true)
|
||||
);
|
||||
|
||||
/**
|
||||
* @name ownSlashes
|
||||
* @description Retrieves the slashes for a specific account across all historic eras.
|
||||
* @param { Uint8Array | string } accountId The validator stash account.
|
||||
* @param { boolean } withActive Whether to include the active era.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const slashes = await api.derive.staking.ownSlashes(
|
||||
* ALICE,
|
||||
* true
|
||||
* );
|
||||
* console.log(slashes);
|
||||
* ```
|
||||
*/
|
||||
export const ownSlashes = /*#__PURE__*/ erasHistoricApplyAccount('_ownSlashes');
|
||||
|
||||
@@ -184,15 +184,36 @@ function getBatch (api: DeriveApi, activeEra: EraIndex, stashIds: AccountId[], f
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
/**
|
||||
* @description From a stash, retrieve the controllerId and all relevant details
|
||||
* @name query
|
||||
* @param { Uint8Array | string } accountId The stash account to query.
|
||||
* @param { StakingQueryFlags } flags Flags to customize the query.
|
||||
* @param { u32 } page (Optional) pagination parameter.
|
||||
* @description Retrieves staking details for a given stash account.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const stakingInfo = await api.derive.staking.query(
|
||||
* ALICE,
|
||||
* {}
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export const query = /*#__PURE__*/ firstMemo(
|
||||
(api: DeriveApi, accountId: Uint8Array | string, flags: StakingQueryFlags, page?: u32) =>
|
||||
api.derive.staking.queryMulti([accountId], flags, page)
|
||||
);
|
||||
|
||||
/**
|
||||
* @name queryMulti
|
||||
* @param { (Uint8Array | string)[] } accountIds List of stash accounts to query.
|
||||
* @param { StakingQueryFlags } flags Flags to customize the query.
|
||||
* @param { u32 } page (Optional) pagination parameter.
|
||||
* @description Retrieves staking details for multiple stash accounts.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const stakingInfos = await api.derive.staking.queryMulti([stashId1, stashId2], {});
|
||||
* ```
|
||||
*/
|
||||
export function queryMulti (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags, page?: u32 | AnyNumber) => Observable<DeriveStakingQuery[]> {
|
||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags, page?: u32 | AnyNumber): Observable<DeriveStakingQuery[]> =>
|
||||
api.derive.session.indexes().pipe(
|
||||
|
||||
@@ -38,6 +38,19 @@ export function _stakerExposures (instanceId: string, api: DeriveApi): (accountI
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @name stakerExposures
|
||||
* @param { (Uint8Array | string)[] } accountIds List of validator stash accounts.
|
||||
* @param { boolean } withActive Whether to include the active era.
|
||||
* @description Retrieves staking exposure for multiple accounts across historical eras.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const exposure = await api.derive.staking.stakerExposures(
|
||||
* [ALICE, BOB],
|
||||
* true
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export function stakerExposures (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], withActive?: boolean) => Observable<DeriveStakerExposure[][]> {
|
||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], withActive = false): Observable<DeriveStakerExposure[][]> =>
|
||||
api.derive.staking.erasHistoric(withActive).pipe(
|
||||
@@ -46,6 +59,19 @@ export function stakerExposures (instanceId: string, api: DeriveApi): (accountId
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name stakerExposure
|
||||
* @param { Uint8Array | string } accountId The validator stash account.
|
||||
* @param { boolean } withActive Whether to include the active era.
|
||||
* @description Retrieves staking exposure for a single account across historical eras. Exposure refers to the total stake associated with a validator.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const exposure = await api.derive.staking.stakerExposure(
|
||||
* ALICE,
|
||||
* true
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export const stakerExposure = /*#__PURE__*/ firstMemo(
|
||||
(api: DeriveApi, accountId: Uint8Array | string, withActive?: boolean) =>
|
||||
api.derive.staking.stakerExposures([accountId], withActive)
|
||||
|
||||
@@ -26,4 +26,21 @@ export function _stakerPoints (instanceId: string, api: DeriveApi): (accountId:
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @name stakerPoints
|
||||
* @param { Uint8Array | string } accountId The stakers AccountId.
|
||||
* @param { boolean } withActive Whether to include the active era.
|
||||
* @description Retrieves the era reward points earned by a given staker across all eras.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const points = await api.derive.staking.stakerPoints(
|
||||
* ALICE, //Alice accountId
|
||||
* false
|
||||
* );
|
||||
* console.log(
|
||||
* 'Validator Era Points:',
|
||||
* points.map(({ era, points }) => `Era ${era}: ${points.toString()} points`)
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export const stakerPoints = /*#__PURE__*/ erasHistoricApplyAccount('_stakerPoints');
|
||||
|
||||
@@ -23,4 +23,23 @@ export function _stakerPrefs (instanceId: string, api: DeriveApi): (accountId: U
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name stakerPrefs
|
||||
* @param { Uint8Array | string } accountId The stakers AccountId.
|
||||
* @param { boolean } withActive Whether to include the active era.
|
||||
* @description Retrieves the validator preferences for a given staker across historical eras.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const prefs = await api.derive.staking.stakerPrefs(
|
||||
* ALICE, //Alice accountId
|
||||
* false
|
||||
* );
|
||||
* console.log(
|
||||
* 'Validator Preferences:',
|
||||
* prefs.map(
|
||||
* ({ era, validatorPrefs }) => `Era ${era}: Commission ${validatorPrefs.commission.toString()}`
|
||||
* )
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export const stakerPrefs = /*#__PURE__*/ erasHistoricApplyAccount('_stakerPrefs');
|
||||
|
||||
@@ -235,6 +235,19 @@ export function _stakerRewards (instanceId: string, api: DeriveApi): (accountIds
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name stakerRewards
|
||||
* @description Staking rewards history for a given staker.
|
||||
* @param { Uint8Array | string } accountId The stakers AccountId.
|
||||
* @param { boolean } withActive Whether to include the active era.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const rewards = await api.derive.staking.stakerRewards(
|
||||
* ALICE, //Alice accountId
|
||||
* false
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export const stakerRewards = /*#__PURE__*/ firstMemo(
|
||||
(api: DeriveApi, accountId: Uint8Array | string, withActive?: boolean) =>
|
||||
api.derive.staking.erasHistoric(withActive).pipe(
|
||||
@@ -242,6 +255,19 @@ export const stakerRewards = /*#__PURE__*/ firstMemo(
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* @name stakerRewardsMultiEras
|
||||
* @description Staking rewards for multiple stakers over specific eras.
|
||||
* @param { Uint8Array | string } accountIds List of stakers identified by their AccountId.
|
||||
* @param { EraIndex[] } eras Eras for which to retrieve the data.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const rewards = await api.derive.staking.stakerRewardsMultiEras(
|
||||
* [ALICE, BOB, CHARLIER], //accountIds
|
||||
* [100,101] //eras
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export function stakerRewardsMultiEras (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], eras: EraIndex[]) => Observable<DeriveStakerReward[][]> {
|
||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], eras: EraIndex[]): Observable<DeriveStakerReward[][]> =>
|
||||
accountIds.length && eras.length
|
||||
@@ -250,6 +276,19 @@ export function stakerRewardsMultiEras (instanceId: string, api: DeriveApi): (ac
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name stakerRewardsMulti
|
||||
* @description Staking rewards for multiple stakers.
|
||||
* @param { Uint8Array | string } accountIds List of stakers identified by their AccountId.
|
||||
* @param { boolean } withActive Whether to include the active era.
|
||||
* @example
|
||||
* ```javascript
|
||||
* const rewards = await api.derive.staking.stakerRewardsMulti(
|
||||
* [ALICE, BOB, CHARLIER], //accountIds
|
||||
* true
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
export function stakerRewardsMulti (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], withActive?: boolean) => Observable<DeriveStakerReward[][]> {
|
||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], withActive = false): Observable<DeriveStakerReward[][]> =>
|
||||
api.derive.staking.erasHistoric(withActive).pipe(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user