Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
852cbeb123 | ||
|
|
8f94c8852e | ||
|
|
95d4d7ee71 | ||
|
|
e6d40eb8d0 | ||
|
|
3f73f4dbf5 | ||
|
|
bbd52e5150 | ||
|
|
dc5c66e8af | ||
|
|
9db7d8d290 | ||
|
|
a1c43fed9e | ||
|
|
ed62d164ea | ||
|
|
3d45da3195 | ||
|
|
fff3bb912c | ||
|
|
c959bf928b | ||
|
|
9f48d1447e | ||
|
|
826470d213 | ||
|
|
b9d6b298be | ||
|
|
01883dd869 | ||
|
|
9ae085b575 | ||
|
|
f5b8622d1e | ||
|
|
03fb086ac8 | ||
|
|
70cda770e1 | ||
|
|
9f3e3dba4d | ||
|
|
9505fe5060 | ||
|
|
dada3b4371 |
@@ -1,5 +1,32 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 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
|
## 15.6.1 Feb 17, 2025
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|||||||
+3
-3
@@ -1,15 +1,15 @@
|
|||||||
3512 Jaco Bump deps (#5785)
|
3512 Jaco Bump deps (#5785)
|
||||||
159 Tarik Gul 15.5.2 (#6086)
|
161 Tarik Gul Add WeightReclaim transaction extension to known extensions (#6102)
|
||||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||||
37 Keith Ingram Update contract types and rpc (#4541)
|
37 Keith Ingram Update contract types and rpc (#4541)
|
||||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||||
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
||||||
19 Xiliang Chen no warm for unknown signed extensions (#5601)
|
19 Xiliang Chen no warm for unknown signed extensions (#5601)
|
||||||
|
18 Valentin Fernandez Increase version to 15.8.1 (#6114)
|
||||||
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
||||||
14 Nikos Kontakis Bump substrate connect to 0.7.16 (#5307)
|
14 Nikos Kontakis Bump substrate connect to 0.7.16 (#5307)
|
||||||
11 Ian He HttpProvider support clone() (#3949)
|
11 Ian He HttpProvider support clone() (#3949)
|
||||||
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
||||||
10 Valentin Fernandez prepare 15.6.1 release (#6097)
|
|
||||||
6 Andreea Eftene Update check for contract instantiation (#5699)
|
6 Andreea Eftene Update check for contract instantiation (#5699)
|
||||||
6 Branislav Kontur Fix for fungiblesApi (#5944)
|
6 Branislav Kontur Fix for fungiblesApi (#5944)
|
||||||
5 Alberto Nicolas Penayo added use of accountNonceApi (#5915)
|
5 Alberto Nicolas Penayo added use of accountNonceApi (#5915)
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
3 André Silva add support for ValidationCodeHash (#3640)
|
3 André Silva add support for ValidationCodeHash (#3640)
|
||||||
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
||||||
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
||||||
|
3 Arjun Porwal Upgrade Polkadot types to v1.4.0 (#6100)
|
||||||
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
||||||
3 hamidra add support for n key entries for NMaps (#3886)
|
3 hamidra add support for n key entries for NMaps (#3886)
|
||||||
3 Hamza Tokuchi more typos (#2532)
|
3 Hamza Tokuchi more typos (#2532)
|
||||||
@@ -59,7 +60,6 @@
|
|||||||
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
||||||
1 Aleš Ferlan fix: use H160 for address in getTransactionCount (#5472)
|
1 Aleš Ferlan fix: use H160 for address in getTransactionCount (#5472)
|
||||||
1 Alisher A. Khassanov Add `offchain_localStorageClear` RPC method (#6070)
|
1 Alisher A. Khassanov Add `offchain_localStorageClear` RPC method (#6070)
|
||||||
1 Arjun Porwal fix: check for api.query.identity in getSubIdentities (#6093)
|
|
||||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||||
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
||||||
1 Cameron Marshall implement xcm dry run api (#5970)
|
1 Cameron Marshall implement xcm dry run api (#5970)
|
||||||
|
|||||||
+3
-3
@@ -14,10 +14,10 @@
|
|||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "15.6.1",
|
"version": "15.8.1",
|
||||||
"versions": {
|
"versions": {
|
||||||
"git": "15.6.1",
|
"git": "15.8.1",
|
||||||
"npm": "15.6.1"
|
"npm": "15.8.1"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|||||||
@@ -18,14 +18,14 @@
|
|||||||
"./packageDetect.cjs"
|
"./packageDetect.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "15.6.1",
|
"version": "15.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@polkadot/api-base": "15.6.1",
|
"@polkadot/api-base": "15.8.1",
|
||||||
"@polkadot/rpc-augment": "15.6.1",
|
"@polkadot/rpc-augment": "15.8.1",
|
||||||
"@polkadot/types": "15.6.1",
|
"@polkadot/types": "15.8.1",
|
||||||
"@polkadot/types-augment": "15.6.1",
|
"@polkadot/types-augment": "15.8.1",
|
||||||
"@polkadot/types-codec": "15.6.1",
|
"@polkadot/types-codec": "15.8.1",
|
||||||
"@polkadot/util": "^13.4.3",
|
"@polkadot/util": "^13.4.3",
|
||||||
"tslib": "^2.8.1"
|
"tslib": "^2.8.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -240,6 +240,20 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[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: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* The minimum amount of improvement to the solution score that defines a solution as
|
* 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>;
|
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.
|
* 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>;
|
[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: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* Some bound not met
|
* 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.
|
* A reward pool does not exist. In all cases this is a system logic error.
|
||||||
**/
|
**/
|
||||||
RewardPoolNotFound: AugmentedError<ApiType>;
|
RewardPoolNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The slash amount is too low to be applied.
|
||||||
|
**/
|
||||||
|
SlashTooLow: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* A sub pool does not exist.
|
* A sub pool does not exist.
|
||||||
**/
|
**/
|
||||||
@@ -1285,10 +1359,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Output code is too large
|
* Output code is too large
|
||||||
**/
|
**/
|
||||||
NewCodeTooLarge: AugmentedError<ApiType>;
|
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
|
* The `para_head` hash in the candidate descriptor doesn't match the hash of the actual
|
||||||
* para head in the commitments.
|
* para head in the commitments.
|
||||||
@@ -1479,10 +1549,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Preimage has already been noted on-chain.
|
* Preimage has already been noted on-chain.
|
||||||
**/
|
**/
|
||||||
AlreadyNoted: AugmentedError<ApiType>;
|
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.
|
* 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 { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, 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>;
|
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.
|
* An \[account\] has cancelled a previous delegation operation.
|
||||||
**/
|
**/
|
||||||
Undelegated: AugmentedEvent<ApiType, [AccountId32]>;
|
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
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -316,6 +324,28 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[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: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* An election failed.
|
* An election failed.
|
||||||
@@ -735,8 +765,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A member has been removed from a pool.
|
* A member has been removed from a pool.
|
||||||
*
|
*
|
||||||
* The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked).
|
* 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.
|
* 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]`
|
* 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]`
|
* 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]`
|
* 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.
|
* 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 { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
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';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||||
@@ -474,6 +474,31 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[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: {
|
dmp: {
|
||||||
/**
|
/**
|
||||||
* The factor to multiply the base delivery fee by.
|
* 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.
|
* 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
|
* 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
|
* it's lookahead. Keeping track of this affinity prevents parallel execution of the same
|
||||||
* `ParaId` on two or more `CoreIndex`es.
|
* `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)
|
* 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.
|
* 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.
|
* 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
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -1187,7 +1212,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* Stored parameters.
|
* 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
|
* 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
|
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||||
* the format will require migration of parachains.
|
* 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
|
* This is used by the relay-chain to communicate that there are restrictions for performing
|
||||||
* an upgrade for this parachain.
|
* 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
|
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||||
* the format will require migration of parachains.
|
* 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
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -1393,7 +1418,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* All ongoing or concluded disputes for the last several sessions.
|
* 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`,
|
* 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,
|
* 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.
|
* 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.
|
* 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.
|
* 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
|
* 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.
|
* Session information in a rolling window.
|
||||||
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
||||||
* Does not have any entries before the session index in the first session change notification.
|
* 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
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -1456,7 +1481,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The parachain attestation keys of the validators actively participating in parachain
|
* The parachain attestation keys of the validators actively participating in parachain
|
||||||
* consensus. This should be the same length as `ActiveValidatorIndices`.
|
* 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.
|
* All allowed relay-parents.
|
||||||
**/
|
**/
|
||||||
@@ -1474,7 +1499,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* Validators pending dispute slashes.
|
* 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.
|
* `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 { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||||
import type { ParaId, ValidationCodeHash } from '@polkadot/types/interfaces/parachains';
|
import type { ParaId, ValidationCodeHash } from '@polkadot/types/interfaces/parachains';
|
||||||
import type { AccountId32, H256, RuntimeCall, Slot } from '@polkadot/types/interfaces/runtime';
|
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';
|
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
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
|
* Return the block number where BEEFY consensus is enabled/started
|
||||||
**/
|
**/
|
||||||
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<u32>>>;
|
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.
|
* 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>>>;
|
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
|
* 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>>>;
|
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>>>;
|
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>>;
|
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>>;
|
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.
|
* 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.
|
* Returns the equivalent balance of `points` for a given pool.
|
||||||
**/
|
**/
|
||||||
pointsToBalance: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array, points: u128 | AnyNumber | Uint8Array) => Observable<u128>>;
|
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.
|
* 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
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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
|
* 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.
|
* 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
|
* Claim queue
|
||||||
**/
|
**/
|
||||||
@@ -370,7 +390,7 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
/**
|
/**
|
||||||
* Returns all onchain disputes.
|
* 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.
|
* 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.
|
* 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!
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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`.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* Get the current validators.
|
||||||
**/
|
**/
|
||||||
validators: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7ValidatorAppPublic>>>;
|
validators: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV8ValidatorAppPublic>>>;
|
||||||
/**
|
/**
|
||||||
* Generic call
|
* 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 { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { 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 __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
||||||
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
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
|
* against the extracted offender. If both are valid, the offence
|
||||||
* will be reported.
|
* 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
|
* Report voter equivocation/misbehavior. This method will verify the
|
||||||
* equivocation proof and validate the given key ownership proof
|
* 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
|
* if the block author is defined it will be defined as the equivocation
|
||||||
* reporter.
|
* 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
|
* Reset BEEFY consensus by setting a new BEEFY genesis at `delay_in_blocks` blocks in the
|
||||||
* future.
|
* future.
|
||||||
@@ -631,11 +665,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Set approval-voting-params.
|
* 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.
|
* 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.
|
* Setting this to true will disable consistency checks for the configuration setters.
|
||||||
* Use with caution.
|
* Use with caution.
|
||||||
@@ -663,7 +697,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Set PVF executor parameters.
|
* 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
|
* Set the parachain validator-group rotation frequency
|
||||||
**/
|
**/
|
||||||
@@ -813,7 +847,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Set scheduler-params.
|
* 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.
|
* 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:
|
* Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:
|
||||||
* [`adapter::StakeStrategyType::Delegate`].
|
* [`adapter::StakeStrategyType::Delegate`].
|
||||||
*
|
*
|
||||||
* This call can be dispatched permissionlessly (i.e. by any account). If the member has
|
* The pending slash amount of the member must be equal or more than `ExistentialDeposit`.
|
||||||
* slash to be applied, caller may be rewarded with the part of the slash.
|
* 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]>;
|
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]>;
|
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
|
* Stake funds with a pool. The amount to bond is transferred from the member to the pool
|
||||||
* pools account and immediately increases the pools bond.
|
* 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
|
* # Note
|
||||||
*
|
*
|
||||||
@@ -2310,7 +2351,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Enter the paras inherent. This will process bitfields and backed candidates.
|
* 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
|
* 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
|
* The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be
|
||||||
* deleted by setting them to `None`.
|
* 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
|
* 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
|
* 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.
|
* 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.
|
* 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>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
parasSlashing: {
|
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
|
* 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
|
* - `delay`: The announcement period required of the initial proxy. Will generally be
|
||||||
* zero.
|
* 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.
|
* 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.
|
* 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.
|
* 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
|
* Fails with `NoPermission` in case the caller is not a previously created pure
|
||||||
* account whose `pure` call has corresponding parameters.
|
* 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
|
* Dispatch the given `call` from an account that the sender is authorised for through
|
||||||
* `add_proxy`.
|
* `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.
|
* - `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.
|
* - `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
|
* Dispatch the given `call` from an account that the sender is authorized for through
|
||||||
* `add_proxy`.
|
* `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.
|
* - `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.
|
* - `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.
|
* 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`: The account that the `caller` would like to remove as a proxy.
|
||||||
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
* - `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
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '15.6.1' };
|
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '15.8.1' };
|
||||||
|
|||||||
@@ -240,6 +240,20 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[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: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* The minimum amount of improvement to the solution score that defines a solution as
|
* 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>;
|
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.
|
* 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>;
|
[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: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* Some bound not met
|
* 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.
|
* A reward pool does not exist. In all cases this is a system logic error.
|
||||||
**/
|
**/
|
||||||
RewardPoolNotFound: AugmentedError<ApiType>;
|
RewardPoolNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The slash amount is too low to be applied.
|
||||||
|
**/
|
||||||
|
SlashTooLow: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* A sub pool does not exist.
|
* A sub pool does not exist.
|
||||||
**/
|
**/
|
||||||
@@ -1052,10 +1126,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Output code is too large
|
* Output code is too large
|
||||||
**/
|
**/
|
||||||
NewCodeTooLarge: AugmentedError<ApiType>;
|
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
|
* The `para_head` hash in the candidate descriptor doesn't match the hash of the actual
|
||||||
* para head in the commitments.
|
* para head in the commitments.
|
||||||
@@ -1246,10 +1316,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Preimage has already been noted on-chain.
|
* Preimage has already been noted on-chain.
|
||||||
**/
|
**/
|
||||||
AlreadyNoted: AugmentedError<ApiType>;
|
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.
|
* 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 { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, H256, Perbill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256, Perbill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportDispatchDispatchInfo, 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>;
|
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.
|
* An \[account\] has cancelled a previous delegation operation.
|
||||||
**/
|
**/
|
||||||
Undelegated: AugmentedEvent<ApiType, [AccountId32]>;
|
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
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -316,6 +324,28 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[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: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* An election failed.
|
* An election failed.
|
||||||
@@ -514,8 +544,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A member has been removed from a pool.
|
* A member has been removed from a pool.
|
||||||
*
|
*
|
||||||
* The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked).
|
* 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.
|
* 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]`
|
* 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]`
|
* 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]`
|
* 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.
|
* 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>;
|
[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: {
|
paras: {
|
||||||
/**
|
/**
|
||||||
* A para has been queued to execute pending actions. `para_id`
|
* 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 { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
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';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||||
@@ -468,6 +468,31 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[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: {
|
dmp: {
|
||||||
/**
|
/**
|
||||||
* The factor to multiply the base delivery fee by.
|
* 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.
|
* 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
|
* 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
|
* it's lookahead. Keeping track of this affinity prevents parallel execution of the same
|
||||||
* `ParaId` on two or more `CoreIndex`es.
|
* `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)
|
* 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.
|
* 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.
|
* 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
|
|
||||||
**/
|
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
|
||||||
};
|
|
||||||
parameters: {
|
|
||||||
/**
|
|
||||||
* Stored parameters.
|
|
||||||
**/
|
|
||||||
parameters: AugmentedQuery<ApiType, (arg: PolkadotRuntimeRuntimeParametersKey | { Inflation: any } | string | Uint8Array) => Observable<Option<PolkadotRuntimeRuntimeParametersValue>>, [PolkadotRuntimeRuntimeParametersKey]> & QueryableStorageEntry<ApiType, [PolkadotRuntimeRuntimeParametersKey]>;
|
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* 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
|
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||||
* the format will require migration of parachains.
|
* 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
|
* This is used by the relay-chain to communicate that there are restrictions for performing
|
||||||
* an upgrade for this parachain.
|
* 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
|
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||||
* the format will require migration of parachains.
|
* 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
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -1233,7 +1248,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* All ongoing or concluded disputes for the last several sessions.
|
* 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`,
|
* 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,
|
* 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.
|
* 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.
|
* 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.
|
* 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
|
* 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.
|
* Session information in a rolling window.
|
||||||
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
|
||||||
* Does not have any entries before the session index in the first session change notification.
|
* 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
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -1296,7 +1311,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The parachain attestation keys of the validators actively participating in parachain
|
* The parachain attestation keys of the validators actively participating in parachain
|
||||||
* consensus. This should be the same length as `ActiveValidatorIndices`.
|
* 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.
|
* All allowed relay-parents.
|
||||||
**/
|
**/
|
||||||
@@ -1314,7 +1329,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* Validators pending dispute slashes.
|
* 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.
|
* `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 { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||||
import type { ParaId, ValidationCodeHash } from '@polkadot/types/interfaces/parachains';
|
import type { ParaId, ValidationCodeHash } from '@polkadot/types/interfaces/parachains';
|
||||||
import type { AccountId32, H256, RuntimeCall, Slot } from '@polkadot/types/interfaces/runtime';
|
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';
|
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
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
|
* Return the block number where BEEFY consensus is enabled/started
|
||||||
**/
|
**/
|
||||||
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<u32>>>;
|
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.
|
* 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>>>;
|
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
|
* 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>>>;
|
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>>>;
|
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>>;
|
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>>;
|
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.
|
* 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.
|
* Returns the equivalent balance of `points` for a given pool.
|
||||||
**/
|
**/
|
||||||
pointsToBalance: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array, points: u128 | AnyNumber | Uint8Array) => Observable<u128>>;
|
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.
|
* 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
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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
|
* 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.
|
* 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
|
* Claim queue
|
||||||
**/
|
**/
|
||||||
@@ -370,7 +390,7 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
/**
|
/**
|
||||||
* Returns all onchain disputes.
|
* 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.
|
* 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.
|
* 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!
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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`.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* Get the current validators.
|
||||||
**/
|
**/
|
||||||
validators: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7ValidatorAppPublic>>>;
|
validators: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV8ValidatorAppPublic>>>;
|
||||||
/**
|
/**
|
||||||
* Generic call
|
* 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 { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { 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 __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
||||||
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
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
|
* against the extracted offender. If both are valid, the offence
|
||||||
* will be reported.
|
* 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
|
* Report voter equivocation/misbehavior. This method will verify the
|
||||||
* equivocation proof and validate the given key ownership proof
|
* 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
|
* if the block author is defined it will be defined as the equivocation
|
||||||
* reporter.
|
* 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
|
* Reset BEEFY consensus by setting a new BEEFY genesis at `delay_in_blocks` blocks in the
|
||||||
* future.
|
* future.
|
||||||
@@ -631,11 +665,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Set approval-voting-params.
|
* 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.
|
* 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.
|
* Setting this to true will disable consistency checks for the configuration setters.
|
||||||
* Use with caution.
|
* Use with caution.
|
||||||
@@ -663,7 +697,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Set PVF executor parameters.
|
* 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
|
* Set the parachain validator-group rotation frequency
|
||||||
**/
|
**/
|
||||||
@@ -813,7 +847,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Set scheduler-params.
|
* 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.
|
* 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:
|
* Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:
|
||||||
* [`adapter::StakeStrategyType::Delegate`].
|
* [`adapter::StakeStrategyType::Delegate`].
|
||||||
*
|
*
|
||||||
* This call can be dispatched permissionlessly (i.e. by any account). If the member has
|
* The pending slash amount of the member must be equal or more than `ExistentialDeposit`.
|
||||||
* slash to be applied, caller may be rewarded with the part of the slash.
|
* 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]>;
|
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]>;
|
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
|
* Stake funds with a pool. The amount to bond is transferred from the member to the pool
|
||||||
* pools account and immediately increases the pools bond.
|
* 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
|
* # Note
|
||||||
*
|
*
|
||||||
@@ -1982,20 +2023,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Enter the paras inherent. This will process bitfields and backed candidates.
|
* 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
|
|
||||||
**/
|
|
||||||
[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]>;
|
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* 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
|
* 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.
|
* 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.
|
* 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>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
parasSlashing: {
|
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
|
* 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
|
* - `delay`: The announcement period required of the initial proxy. Will generally be
|
||||||
* zero.
|
* 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.
|
* 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.
|
* 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.
|
* 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
|
* Fails with `NoPermission` in case the caller is not a previously created pure
|
||||||
* account whose `pure` call has corresponding parameters.
|
* 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
|
* Dispatch the given `call` from an account that the sender is authorised for through
|
||||||
* `add_proxy`.
|
* `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.
|
* - `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.
|
* - `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
|
* Dispatch the given `call` from an account that the sender is authorized for through
|
||||||
* `add_proxy`.
|
* `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.
|
* - `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.
|
* - `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.
|
* 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`: The account that the `caller` would like to remove as a proxy.
|
||||||
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
* - `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
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -18,11 +18,11 @@
|
|||||||
"./packageDetect.cjs"
|
"./packageDetect.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "15.6.1",
|
"version": "15.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@polkadot/rpc-core": "15.6.1",
|
"@polkadot/rpc-core": "15.8.1",
|
||||||
"@polkadot/types": "15.6.1",
|
"@polkadot/types": "15.8.1",
|
||||||
"@polkadot/util": "^13.4.3",
|
"@polkadot/util": "^13.4.3",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"tslib": "^2.8.1"
|
"tslib": "^2.8.1"
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '15.6.1' };
|
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '15.8.1' };
|
||||||
|
|||||||
@@ -18,22 +18,22 @@
|
|||||||
"./packageDetect.cjs"
|
"./packageDetect.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "15.6.1",
|
"version": "15.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@polkadot/api": "15.6.1",
|
"@polkadot/api": "15.8.1",
|
||||||
"@polkadot/api-augment": "15.6.1",
|
"@polkadot/api-augment": "15.8.1",
|
||||||
"@polkadot/types": "15.6.1",
|
"@polkadot/types": "15.8.1",
|
||||||
"@polkadot/types-codec": "15.6.1",
|
"@polkadot/types-codec": "15.8.1",
|
||||||
"@polkadot/types-create": "15.6.1",
|
"@polkadot/types-create": "15.8.1",
|
||||||
"@polkadot/util": "^13.4.3",
|
"@polkadot/util": "^13.4.3",
|
||||||
"@polkadot/util-crypto": "^13.4.3",
|
"@polkadot/util-crypto": "^13.4.3",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"tslib": "^2.8.1"
|
"tslib": "^2.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "15.6.1",
|
"@polkadot/api-augment": "15.8.1",
|
||||||
"@polkadot/keyring": "^13.4.3",
|
"@polkadot/keyring": "^13.4.3",
|
||||||
"@polkadot/types-support": "15.6.1"
|
"@polkadot/types-support": "15.8.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '15.6.1' };
|
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '15.8.1' };
|
||||||
|
|||||||
@@ -1,3 +1,30 @@
|
|||||||
# @polkadot/api-derive
|
# @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"
|
"./packageDetect.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "15.6.1",
|
"version": "15.8.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@polkadot/api": "15.6.1",
|
"@polkadot/api": "15.8.1",
|
||||||
"@polkadot/api-augment": "15.6.1",
|
"@polkadot/api-augment": "15.8.1",
|
||||||
"@polkadot/api-base": "15.6.1",
|
"@polkadot/api-base": "15.8.1",
|
||||||
"@polkadot/rpc-core": "15.6.1",
|
"@polkadot/rpc-core": "15.8.1",
|
||||||
"@polkadot/types": "15.6.1",
|
"@polkadot/types": "15.8.1",
|
||||||
"@polkadot/types-codec": "15.6.1",
|
"@polkadot/types-codec": "15.8.1",
|
||||||
"@polkadot/util": "^13.4.3",
|
"@polkadot/util": "^13.4.3",
|
||||||
"@polkadot/util-crypto": "^13.4.3",
|
"@polkadot/util-crypto": "^13.4.3",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
"tslib": "^2.8.1"
|
"tslib": "^2.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api": "15.6.1",
|
"@polkadot/api": "15.8.1",
|
||||||
"@polkadot/api-augment": "15.6.1",
|
"@polkadot/api-augment": "15.8.1",
|
||||||
"@polkadot/rpc-augment": "15.6.1",
|
"@polkadot/rpc-augment": "15.8.1",
|
||||||
"@polkadot/rpc-provider": "15.6.1",
|
"@polkadot/rpc-provider": "15.8.1",
|
||||||
"@polkadot/types-support": "15.6.1"
|
"@polkadot/types-support": "15.8.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,16 @@ import { memo } from '../util/index.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name accountId
|
* @name accountId
|
||||||
* @param {(Address | AccountId | AccountIndex | string | null)} address - An accounts address in various formats.
|
* @param {(Address | AccountId | AccountIndex | string | null)} address An accounts address in various formats.
|
||||||
* @description An [[AccountId]]
|
* @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> {
|
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> => {
|
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
|
* @name flags
|
||||||
* @description Returns account membership 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> {
|
export function flags (instanceId: string, api: DeriveApi): (address?: AccountId | Address | string | null) => Observable<DeriveAccountFlags> {
|
||||||
return memo(instanceId, (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
|
* @name idAndIndex
|
||||||
* @param {(Address | AccountId | AccountIndex | Uint8Array | string | null)} address - An accounts address in various formats.
|
* @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.
|
* @description An array containing the [[AccountId]] and [[AccountIndex]] as optional values.
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* api.derive.accounts.idAndIndex('F7Hs', ([id, ix]) => {
|
* api.derive.accounts.idAndIndex('F7Hs', ([id, ix]) => {
|
||||||
* console.log(`AccountId #${id} with corresponding AccountIndex ${ix}`);
|
* console.log(`AccountId #${id} with corresponding AccountIndex ${ix}`);
|
||||||
|
|||||||
@@ -11,11 +11,9 @@ import { memo } from '../util/index.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name idToIndex
|
* @name idToIndex
|
||||||
* @param {( AccountId | string )} accountId - An accounts Id in different formats.
|
* @description Retrieves the corresponding AccountIndex.
|
||||||
* @returns Returns the corresponding AccountIndex.
|
* @param {( AccountId | string )} accountId An accounts Id in different formats.
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
|
* const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
|
||||||
* api.derive.accounts.idToIndex(ALICE, (accountIndex) => {
|
* api.derive.accounts.idToIndex(ALICE, (accountIndex) => {
|
||||||
|
|||||||
@@ -125,7 +125,19 @@ export function _identity (instanceId: string, api: DeriveApi): (accountId?: Acc
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name identity
|
* @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> {
|
export function identity (instanceId: string, api: DeriveApi): (accountId?: AccountId | Uint8Array | string) => Observable<DeriveAccountRegistration> {
|
||||||
return memo(instanceId, (accountId?: AccountId | Uint8Array | string): Observable<DeriveAccountRegistration> =>
|
return memo(instanceId, (accountId?: AccountId | Uint8Array | string): Observable<DeriveAccountRegistration> =>
|
||||||
@@ -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(
|
export const hasIdentity = /*#__PURE__*/ firstMemo(
|
||||||
(api: DeriveApi, accountId: AccountId | Uint8Array | string) =>
|
(api: DeriveApi, accountId: AccountId | Uint8Array | string) =>
|
||||||
api.derive.accounts.hasIdentityMulti([accountId])
|
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[]> {
|
export function hasIdentityMulti (instanceId: string, api: DeriveApi): (accountIds: (AccountId | Uint8Array | string)[]) => Observable<DeriveHasIdentity[]> {
|
||||||
return memo(instanceId, (accountIds: (AccountId | Uint8Array | string)[]): Observable<DeriveHasIdentity[]> =>
|
return memo(instanceId, (accountIds: (AccountId | Uint8Array | string)[]): Observable<DeriveHasIdentity[]> =>
|
||||||
api.query.identity?.identityOf
|
api.query.identity?.identityOf
|
||||||
|
|||||||
@@ -11,15 +11,13 @@ import { memo } from '../util/index.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name indexToId
|
* @name indexToId
|
||||||
* @param {( AccountIndex | string )} accountIndex - An accounts index in different formats.
|
* @description Resolves an AccountIndex (short address) to the full AccountId.
|
||||||
* @returns Returns the corresponding AccountId.
|
* @param {( AccountIndex | string )} accountIndex An accounts index in different formats.
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* api.derive.accounts.indexToId('F7Hs', (accountId) => {
|
* const ALICE = "13AU";
|
||||||
* console.log(`The AccountId of F7Hs is ${accountId}`);
|
* const id = await api.derive.accounts.indexToId(ALICE);
|
||||||
* });
|
* console.log(id);
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
export function indexToId (instanceId: string, api: DeriveApi): (accountIndex: AccountIndex | string) => Observable<AccountId | undefined> {
|
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.
|
* @returns Returns all the indexes on the system.
|
||||||
* @description This is an unwieldly query since it loops through
|
* @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
|
* 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
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* api.derive.accounts.indexes((indexes) => {
|
* api.derive.accounts.indexes((indexes) => {
|
||||||
* console.log('All existing AccountIndexes', indexes);
|
* console.log('All existing AccountIndexes', indexes);
|
||||||
|
|||||||
@@ -29,7 +29,17 @@ function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name info
|
* @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> {
|
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> =>
|
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';
|
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');
|
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');
|
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');
|
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');
|
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');
|
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');
|
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');
|
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> {
|
export function get (instanceId: string, api: DeriveApi): (id: BN | number) => Observable<Bag> {
|
||||||
return memo(instanceId, (id: BN | number): Observable<Bag> =>
|
return memo(instanceId, (id: BN | number): Observable<Bag> =>
|
||||||
api.derive.bagsList._getIds([bnToBn(id)]).pipe(
|
api.derive.bagsList._getIds([bnToBn(id)]).pipe(
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ import { objectSpread } from '@polkadot/util';
|
|||||||
|
|
||||||
import { memo } from '../util/index.js';
|
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> {
|
export function expand (instanceId: string, api: DeriveApi): (bag: Bag) => Observable<BagExpanded> {
|
||||||
return memo(instanceId, (bag: Bag): Observable<BagExpanded> =>
|
return memo(instanceId, (bag: Bag): Observable<BagExpanded> =>
|
||||||
api.derive.bagsList.listNodes(bag.bag).pipe(
|
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> {
|
export function getExpanded (instanceId: string, api: DeriveApi): (id: BN | number) => Observable<BagExpanded> {
|
||||||
return memo(instanceId, (id: BN | number): Observable<BagExpanded> =>
|
return memo(instanceId, (id: BN | number): Observable<BagExpanded> =>
|
||||||
api.derive.bagsList.get(id).pipe(
|
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[]> {
|
export function listNodes (instanceId: string, api: DeriveApi): (bag: PalletBagsListListBag | null) => Observable<PalletBagsListListNode[]> {
|
||||||
return memo(instanceId, (bag: PalletBagsListListBag | null): Observable<PalletBagsListListNode[]> =>
|
return memo(instanceId, (bag: PalletBagsListListBag | null): Observable<PalletBagsListListNode[]> =>
|
||||||
bag && bag.head.isSome
|
bag && bag.head.isSome
|
||||||
|
|||||||
@@ -167,11 +167,9 @@ function querySystemAccount (api: DeriveApi, accountId: AccountId): Observable<R
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name account
|
* @name account
|
||||||
* @param {( AccountIndex | AccountId | Address | string )} address - An accounts Id in different formats.
|
* @description Retrieves the essential balance details for an account, such as free balance and account nonce.
|
||||||
* @returns An object containing the results of various balance queries
|
* @param {( AccountIndex | AccountId | Address | string )} address An accountsId in different formats.
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* const ALICE = 'F7Hs';
|
* const ALICE = 'F7Hs';
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -210,16 +210,17 @@ function queryCurrent (api: DeriveApi, accountId: AccountId | string, balanceIns
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name all
|
* @name all
|
||||||
* @param {( AccountIndex | AccountId | Address | string )} address - An accounts Id in different formats.
|
* @description Retrieves the complete balance information for an account, including free balance, locked balance, reserved balance, and more.
|
||||||
* @returns An object containing the results of various balance queries
|
* @param {( AccountId | string )} address An accountsId in different formats.
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* const ALICE = 'F7Hs';
|
* const ALICE = 'F7Hs';
|
||||||
*
|
*
|
||||||
* api.derive.balances.all(ALICE, ({ accountId, lockedBalance }) => {
|
* api.derive.balances.account(ALICE, (accountInfo) => {
|
||||||
* console.log(`The account ${accountId} has a locked balance ${lockedBalance} units.`);
|
* 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 './account.js';
|
||||||
export * from './votingBalances.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;
|
const votingBalance = all;
|
||||||
|
|
||||||
export { all, votingBalance };
|
export { all, votingBalance };
|
||||||
|
|||||||
@@ -9,6 +9,17 @@ import { combineLatest, of } from 'rxjs';
|
|||||||
|
|
||||||
import { memo } from '../util/index.js';
|
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[]> {
|
export function votingBalances (instanceId: string, api: DeriveApi): (addresses?: (AccountId | AccountIndex | Address | string)[]) => Observable<DeriveBalancesAccount[]> {
|
||||||
return memo(instanceId, (addresses?: (AccountId | AccountIndex | Address | string)[]): Observable<DeriveBalancesAccount[]> =>
|
return memo(instanceId, (addresses?: (AccountId | AccountIndex | Address | string)[]): Observable<DeriveBalancesAccount[]> =>
|
||||||
!addresses?.length
|
!addresses?.length
|
||||||
|
|||||||
@@ -33,6 +33,15 @@ function parseResult ([maybeBounties, maybeDescriptions, ids, bountyProposals]:
|
|||||||
return bounties;
|
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> {
|
export function bounties (instanceId: string, api: DeriveApi): () => Observable<DeriveBounties> {
|
||||||
const bountyBase = api.query.bounties || api.query.treasury;
|
const bountyBase = api.query.bounties || api.query.treasury;
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,8 @@ import { createBlockNumberDerive } from './util.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name bestNumber
|
* @name bestNumber
|
||||||
* @returns The latest block number.
|
* @descrive Retrieves the latest block number.
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* api.derive.chain.bestNumber((blockNumber) => {
|
* api.derive.chain.bestNumber((blockNumber) => {
|
||||||
* console.log(`the current best block is #${blockNumber}`);
|
* console.log(`the current best block is #${blockNumber}`);
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ import { createBlockNumberDerive } from './util.js';
|
|||||||
* @returns A BlockNumber
|
* @returns A BlockNumber
|
||||||
* @description Get the latest finalized block number.
|
* @description Get the latest finalized block number.
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* api.derive.chain.bestNumberFinalized((blockNumber) => {
|
* api.derive.chain.bestNumberFinalized((blockNumber) => {
|
||||||
* console.log(`the current finalized block is #${blockNumber}`);
|
* console.log(`the current finalized block is #${blockNumber}`);
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ import { memo } from '../util/index.js';
|
|||||||
* @name bestNumberLag
|
* @name bestNumberLag
|
||||||
* @returns A number of blocks
|
* @returns A number of blocks
|
||||||
* @description Calculates the lag between finalized head and best head
|
* @description Calculates the lag between finalized head and best head
|
||||||
* @example
|
* @examplew
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* api.derive.chain.bestNumberLag((lag) => {
|
* api.derive.chain.bestNumberLag((lag) => {
|
||||||
* console.log(`finalized is ${lag} blocks behind head`);
|
* console.log(`finalized is ${lag} blocks behind head`);
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ import { getAuthorDetails } from './util.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name getBlock
|
* @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
|
* @description Get a specific block (e.g. rpc.chain.getBlock) and extend it with the author
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* const { author, block } = await api.derive.chain.getBlock('0x123...456');
|
* const { author, block } = await api.derive.chain.getBlock('0x123...456');
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -10,6 +10,17 @@ import { switchMap } from 'rxjs';
|
|||||||
|
|
||||||
import { memo } from '../util/index.js';
|
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> {
|
export function getBlockByNumber (instanceId: string, api: DeriveApi): (blockNumber: AnyNumber) => Observable<SignedBlockExtended> {
|
||||||
return memo(instanceId, (blockNumber: AnyNumber): Observable<SignedBlockExtended> =>
|
return memo(instanceId, (blockNumber: AnyNumber): Observable<SignedBlockExtended> =>
|
||||||
api.rpc.chain.getBlockHash(blockNumber).pipe(
|
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
|
* @returns An array containing the block header and the block author
|
||||||
* @description Get a specific block header and extend it with the author
|
* @description Get a specific block header and extend it with the author
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* const { author, number } = await api.derive.chain.getHeader('0x123...456');
|
* const { author, number } = await api.derive.chain.getHeader('0x123...456');
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -11,7 +11,13 @@ import { memo } from '../util/index.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name subscribeFinalizedBlocks
|
* @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> {
|
export function subscribeFinalizedBlocks (instanceId: string, api: DeriveApi): () => Observable<SignedBlockExtended> {
|
||||||
return memo(instanceId, (): 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
|
* @description An observable of the finalized block headers. Unlike the base
|
||||||
* chain.subscribeFinalizedHeads this does not skip any headers. Since finalization
|
* chain.subscribeFinalizedHeads this does not skip any headers. Since finalization
|
||||||
* may skip specific blocks (finalization happens in terms of chains), this version
|
* may skip specific blocks (finalization happens in terms of chains), this version
|
||||||
* of the derive tracks missing headers (since last retrieved) and provides them
|
* of the derive tracks missing headers (since last retrieved) and provides them
|
||||||
* to the caller
|
* 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> {
|
export function subscribeFinalizedHeads (instanceId: string, api: DeriveApi): () => Observable<Header> {
|
||||||
return memo(instanceId, (): Observable<Header> => {
|
return memo(instanceId, (): Observable<Header> => {
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ import { memo } from '../util/index.js';
|
|||||||
/**
|
/**
|
||||||
* @name subscribeNewBlocks
|
* @name subscribeNewBlocks
|
||||||
* @returns The latest block & events for that block
|
* @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> {
|
export function subscribeNewBlocks (instanceId: string, api: DeriveApi): () => Observable<SignedBlockExtended> {
|
||||||
return memo(instanceId, (): Observable<SignedBlockExtended> =>
|
return memo(instanceId, (): Observable<SignedBlockExtended> =>
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ import { getAuthorDetails } from './util.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name subscribeNewHeads
|
* @name subscribeNewHeads
|
||||||
* @returns A header with the current header (including extracted author)
|
* @returns A header with the current header (including extracted author).
|
||||||
* @description An observable of the current block header and it's author
|
* @description An observable of the current block header and it's author.
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* api.derive.chain.subscribeNewHeads((header) => {
|
* api.derive.chain.subscribeNewHeads((header) => {
|
||||||
* console.log(`block #${header.number} was authored by ${header.author}`);
|
* 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
|
* @returns An object containing the combined results of the queries for
|
||||||
* all relevant contract fees as declared in the substrate chain spec.
|
* all relevant contract fees as declared in the substrate chain spec.
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* api.derive.contracts.fees(([creationFee, transferFee]) => {
|
* 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.`);
|
* 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 './votes.js';
|
||||||
export * from './votesOf.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');
|
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');
|
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');
|
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');
|
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');
|
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');
|
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');
|
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> {
|
export function votes (instanceId: string, api: DeriveApi): () => Observable<DeriveCouncilVotes> {
|
||||||
const elections = api.query.elections || api.query['phragmenElection'] || api.query['electionsPhragmen'];
|
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';
|
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> {
|
export function votesOf (instanceId: string, api: DeriveApi): (accountId: string | Uint8Array | AccountId) => Observable<DeriveCouncilVote> {
|
||||||
return memo(instanceId, (accountId: string | Uint8Array | AccountId): Observable<DeriveCouncilVote> =>
|
return memo(instanceId, (accountId: string | Uint8Array | AccountId): Observable<DeriveCouncilVote> =>
|
||||||
api.derive.council.votes().pipe(
|
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> {
|
export function childKey (instanceId: string, api: DeriveApi): (paraId: string | number | BN) => Observable<string | null> {
|
||||||
return memo(instanceId, (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(
|
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> {
|
export function contributions (instanceId: string, api: DeriveApi): (paraId: string | number | BN) => Observable<DeriveContributions> {
|
||||||
return memo(instanceId, (paraId: string | number | BN): Observable<DeriveContributions> =>
|
return memo(instanceId, (paraId: string | number | BN): Observable<DeriveContributions> =>
|
||||||
api.derive.crowdloan.childKey(paraId).pipe(
|
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> {
|
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> =>
|
return memo(instanceId, (paraId: string | number | BN, keys: string[]): Observable<DeriveOwnContributions> =>
|
||||||
api.derive.crowdloan.childKey(paraId).pipe(
|
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[]> {
|
export function dispatchQueue (instanceId: string, api: DeriveApi): () => Observable<DeriveDispatch[]> {
|
||||||
return memo(instanceId, (): Observable<DeriveDispatch[]> =>
|
return memo(instanceId, (): Observable<DeriveDispatch[]> =>
|
||||||
isFunction(api.query.scheduler?.agenda)
|
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[]> {
|
export function locks (instanceId: string, api: DeriveApi): (accountId: string | AccountId) => Observable<DeriveDemocracyLock[]> {
|
||||||
return memo(instanceId, (accountId: string | AccountId): Observable<DeriveDemocracyLock[]> =>
|
return memo(instanceId, (accountId: string | AccountId): Observable<DeriveDemocracyLock[]> =>
|
||||||
api.query.democracy.votingOf
|
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> {
|
export function nextExternal (instanceId: string, api: DeriveApi): () => Observable<DeriveProposalExternal | null> {
|
||||||
return memo(instanceId, (): Observable<DeriveProposalExternal | null> =>
|
return memo(instanceId, (): Observable<DeriveProposalExternal | null> =>
|
||||||
api.query.democracy?.nextExternal
|
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)[]> {
|
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)[]> =>
|
return memo(instanceId, (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]): Observable<(DeriveProposalImage | undefined)[]> =>
|
||||||
hashes.length
|
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(
|
export const preimage = /*#__PURE__*/ firstMemo(
|
||||||
(api: DeriveApi, hash: Hash | Uint8Array | string | FrameSupportPreimagesBounded) =>
|
(api: DeriveApi, hash: Hash | Uint8Array | string | FrameSupportPreimagesBounded) =>
|
||||||
api.derive.democracy.preimages([hash])
|
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[]> {
|
export function proposals (instanceId: string, api: DeriveApi): () => Observable<DeriveProposal[]> {
|
||||||
return memo(instanceId, (): Observable<DeriveProposal[]> =>
|
return memo(instanceId, (): Observable<DeriveProposal[]> =>
|
||||||
isFunction(api.query.democracy?.publicProps)
|
isFunction(api.query.democracy?.publicProps)
|
||||||
|
|||||||
@@ -10,6 +10,14 @@ import { map, of } from 'rxjs';
|
|||||||
|
|
||||||
import { memo } from '../util/index.js';
|
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[]> {
|
export function referendumIds (instanceId: string, api: DeriveApi): () => Observable<BN[]> {
|
||||||
return memo(instanceId, (): Observable<BN[]> =>
|
return memo(instanceId, (): Observable<BN[]> =>
|
||||||
api.query.democracy?.lowestUnbaked
|
api.query.democracy?.lowestUnbaked
|
||||||
|
|||||||
@@ -10,6 +10,14 @@ import { objectSpread } from '@polkadot/util';
|
|||||||
|
|
||||||
import { memo } from '../util/index.js';
|
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[]> {
|
export function referendums (instanceId: string, api: DeriveApi): () => Observable<DeriveReferendumExt[]> {
|
||||||
return memo(instanceId, (): Observable<DeriveReferendumExt[]> =>
|
return memo(instanceId, (): Observable<DeriveReferendumExt[]> =>
|
||||||
api.derive.democracy.referendumsActive().pipe(
|
api.derive.democracy.referendumsActive().pipe(
|
||||||
|
|||||||
@@ -8,6 +8,15 @@ import { of, switchMap } from 'rxjs';
|
|||||||
|
|
||||||
import { memo } from '../util/index.js';
|
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[]> {
|
export function referendumsActive (instanceId: string, api: DeriveApi): () => Observable<DeriveReferendum[]> {
|
||||||
return memo(instanceId, (): Observable<DeriveReferendum[]> =>
|
return memo(instanceId, (): Observable<DeriveReferendum[]> =>
|
||||||
api.derive.democracy.referendumIds().pipe(
|
api.derive.democracy.referendumIds().pipe(
|
||||||
|
|||||||
@@ -11,6 +11,15 @@ import { memo } from '../util/index.js';
|
|||||||
|
|
||||||
type ReferendumInfoFinished = PalletDemocracyReferendumInfo['asFinished'];
|
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[]> {
|
export function referendumsFinished (instanceId: string, api: DeriveApi): () => Observable<ReferendumInfoFinished[]> {
|
||||||
return memo(instanceId, (): Observable<ReferendumInfoFinished[]> =>
|
return memo(instanceId, (): Observable<ReferendumInfoFinished[]> =>
|
||||||
api.derive.democracy.referendumIds().pipe(
|
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[]> {
|
export function referendumsInfo (instanceId: string, api: DeriveApi): (ids: BN[]) => Observable<DeriveReferendum[]> {
|
||||||
return memo(instanceId, (ids: BN[]): Observable<DeriveReferendum[]> =>
|
return memo(instanceId, (ids: BN[]): Observable<DeriveReferendum[]> =>
|
||||||
ids.length
|
ids.length
|
||||||
|
|||||||
@@ -11,6 +11,15 @@ import { bnSqrt } from '@polkadot/util';
|
|||||||
|
|
||||||
import { memo } from '../util/index.js';
|
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> {
|
export function sqrtElectorate (instanceId: string, api: DeriveApi): () => Observable<BN> {
|
||||||
return memo(instanceId, (): Observable<BN> =>
|
return memo(instanceId, (): Observable<BN> =>
|
||||||
api.query.balances.totalIssuance().pipe(
|
api.query.balances.totalIssuance().pipe(
|
||||||
|
|||||||
@@ -94,11 +94,8 @@ function queryCouncil (api: DeriveApi, council: string): Observable<[AccountId32
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name info
|
* @name info
|
||||||
* @returns An object containing the combined results of the storage queries for
|
* @description An object containing the combined results of the storage queries for all relevant election module properties.
|
||||||
* all relevant election module properties.
|
|
||||||
* @example
|
* @example
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
* ```javascript
|
||||||
* api.derive.elections.info(({ members, candidates }) => {
|
* api.derive.elections.info(({ members, candidates }) => {
|
||||||
* console.log(`There are currently ${members.length} council members and ${candidates.length} prospective council 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> {
|
export function receivedHeartbeats (instanceId: string, api: DeriveApi): () => Observable<DeriveHeartbeats> {
|
||||||
return memo(instanceId, (): 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';
|
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');
|
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');
|
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');
|
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');
|
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');
|
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');
|
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');
|
export const prime = /*#__PURE__*/ collectivePrime('membership');
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '15.6.1' };
|
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '15.8.1' };
|
||||||
|
|||||||
@@ -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> {
|
export function info (instanceId: string, api: DeriveApi): (id: ParaId | number) => Observable<DeriveParachainFull | null> {
|
||||||
return memo(instanceId, (id: ParaId | number): Observable<DeriveParachainFull | null> =>
|
return memo(instanceId, (id: ParaId | number): Observable<DeriveParachainFull | null> =>
|
||||||
api.query['registrar'] && api.query['parachains']
|
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[]> {
|
export function overview (instanceId: string, api: DeriveApi): () => Observable<DeriveParachain[]> {
|
||||||
return memo(instanceId, (): Observable<DeriveParachain[]> =>
|
return memo(instanceId, (): Observable<DeriveParachain[]> =>
|
||||||
api.query['registrar']?.['parachains'] && api.query['parachains']
|
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> {
|
export function indexes (instanceId: string, api: DeriveApi): () => Observable<DeriveSessionIndexes> {
|
||||||
return memo(instanceId, (): Observable<DeriveSessionIndexes> =>
|
return memo(instanceId, (): Observable<DeriveSessionIndexes> =>
|
||||||
api.query.session
|
api.query.session
|
||||||
|
|||||||
@@ -11,7 +11,14 @@ import { objectSpread } from '@polkadot/util';
|
|||||||
import { memo } from '../util/index.js';
|
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> {
|
export function info (instanceId: string, api: DeriveApi): () => Observable<DeriveSessionInfo> {
|
||||||
return memo(instanceId, (): 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> {
|
export function progress (instanceId: string, api: DeriveApi): () => Observable<DeriveSessionProgress> {
|
||||||
return memo(instanceId, (): 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');
|
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');
|
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');
|
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[]> {
|
export function candidates (instanceId: string, api: DeriveApi): () => Observable<DeriveSocietyCandidate[]> {
|
||||||
return memo(instanceId, (): 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]
|
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> {
|
export function info (instanceId: string, api: DeriveApi): () => Observable<DeriveSociety> {
|
||||||
return memo(instanceId, (): Observable<DeriveSociety> =>
|
return memo(instanceId, (): Observable<DeriveSociety> =>
|
||||||
|
|||||||
@@ -10,7 +10,14 @@ import { map } from 'rxjs';
|
|||||||
import { memo } from '../util/index.js';
|
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> {
|
export function member (instanceId: string, api: DeriveApi): (accountId: AccountId) => Observable<DeriveSocietyMember> {
|
||||||
return memo(instanceId, (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[]> {
|
export function members (instanceId: string, api: DeriveApi): () => Observable<DeriveSocietyMember[]> {
|
||||||
return memo(instanceId, (): 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
|
* @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[]> {
|
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[]> =>
|
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(
|
export const account = /*#__PURE__*/ firstMemo(
|
||||||
(api: DeriveApi, accountId: Uint8Array | string, opts?: StakingQueryFlags) =>
|
(api: DeriveApi, accountId: Uint8Array | string, opts?: StakingQueryFlags) =>
|
||||||
|
|||||||
@@ -10,7 +10,13 @@ import { switchMap } from 'rxjs';
|
|||||||
import { memo } from '../util/index.js';
|
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> {
|
export function currentPoints (instanceId: string, api: DeriveApi): () => Observable<PalletStakingEraRewardPoints> {
|
||||||
return memo(instanceId, (): 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)))]);
|
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> {
|
export function electedInfo (instanceId: string, api: DeriveApi): (flags?: StakingQueryFlags, page?: number) => Observable<DeriveStakingElected> {
|
||||||
return memo(instanceId, (flags: StakingQueryFlags = DEFAULT_FLAGS, page = 0): Observable<DeriveStakingElected> =>
|
return memo(instanceId, (flags: StakingQueryFlags = DEFAULT_FLAGS, page = 0): Observable<DeriveStakingElected> =>
|
||||||
api.derive.staking.validators().pipe(
|
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 eraExposure = /*#__PURE__*/ singleEra('_eraExposure');
|
||||||
export const _erasExposure = /*#__PURE__*/ combineEras('_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');
|
export const erasExposure = /*#__PURE__*/ erasHistoricApply('_erasExposure');
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ import { BN_ONE, BN_ZERO } from '@polkadot/util';
|
|||||||
|
|
||||||
import { memo } from '../util/index.js';
|
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[]> {
|
export function erasHistoric (instanceId: string, api: DeriveApi): (withActive?: boolean) => Observable<EraIndex[]> {
|
||||||
return memo(instanceId, (withActive?: boolean): Observable<EraIndex[]> =>
|
return memo(instanceId, (withActive?: boolean): Observable<EraIndex[]> =>
|
||||||
combineLatest([
|
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');
|
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 eraPrefs = /*#__PURE__*/ singleEra('_eraPrefs');
|
||||||
export const _erasPrefs = /*#__PURE__*/ combineEras('_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');
|
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');
|
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 eraSlashes = /*#__PURE__*/ singleEra('_eraSlashes');
|
||||||
export const _erasSlashes = /*#__PURE__*/ combineEras('_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');
|
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(
|
export const keys = /*#__PURE__*/ firstMemo(
|
||||||
(api: DeriveApi, stashId: Uint8Array | string) =>
|
(api: DeriveApi, stashId: Uint8Array | string) =>
|
||||||
api.derive.staking.keysMulti([stashId])
|
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[]> {
|
export function keysMulti (instanceId: string, api: DeriveApi): (stashIds: (Uint8Array | string)[]) => Observable<DeriveStakingKeys[]> {
|
||||||
return memo(instanceId, (stashIds: (Uint8Array | string)[]): Observable<DeriveStakingKeys[]> =>
|
return memo(instanceId, (stashIds: (Uint8Array | string)[]): Observable<DeriveStakingKeys[]> =>
|
||||||
stashIds.length
|
stashIds.length
|
||||||
|
|||||||
@@ -11,7 +11,20 @@ import { objectSpread } from '@polkadot/util';
|
|||||||
import { memo } from '../util/index.js';
|
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> {
|
export function overview (instanceId: string, api: DeriveApi): () => Observable<DeriveStakingOverview> {
|
||||||
return memo(instanceId, (): 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(
|
export const ownExposure = /*#__PURE__*/ firstMemo(
|
||||||
(api: DeriveApi, accountId: Uint8Array | string, era: EraIndex, page?: u32 | AnyNumber) =>
|
(api: DeriveApi, accountId: Uint8Array | string, era: EraIndex, page?: u32 | AnyNumber) =>
|
||||||
api.derive.staking._ownExposures(accountId, [era], true, page || 0)
|
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');
|
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(
|
export const ownSlash = /*#__PURE__*/ firstMemo(
|
||||||
(api: DeriveApi, accountId: Uint8Array | string, era: EraIndex) =>
|
(api: DeriveApi, accountId: Uint8Array | string, era: EraIndex) =>
|
||||||
api.derive.staking._ownSlashes(accountId, [era], true)
|
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');
|
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(
|
export const query = /*#__PURE__*/ firstMemo(
|
||||||
(api: DeriveApi, accountId: Uint8Array | string, flags: StakingQueryFlags, page?: u32) =>
|
(api: DeriveApi, accountId: Uint8Array | string, flags: StakingQueryFlags, page?: u32) =>
|
||||||
api.derive.staking.queryMulti([accountId], flags, page)
|
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[]> {
|
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[]> =>
|
return memo(instanceId, (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags, page?: u32 | AnyNumber): Observable<DeriveStakingQuery[]> =>
|
||||||
api.derive.session.indexes().pipe(
|
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[][]> {
|
export function stakerExposures (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], withActive?: boolean) => Observable<DeriveStakerExposure[][]> {
|
||||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], withActive = false): Observable<DeriveStakerExposure[][]> =>
|
return memo(instanceId, (accountIds: (Uint8Array | string)[], withActive = false): Observable<DeriveStakerExposure[][]> =>
|
||||||
api.derive.staking.erasHistoric(withActive).pipe(
|
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(
|
export const stakerExposure = /*#__PURE__*/ firstMemo(
|
||||||
(api: DeriveApi, accountId: Uint8Array | string, withActive?: boolean) =>
|
(api: DeriveApi, accountId: Uint8Array | string, withActive?: boolean) =>
|
||||||
api.derive.staking.stakerExposures([accountId], withActive)
|
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');
|
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');
|
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(
|
export const stakerRewards = /*#__PURE__*/ firstMemo(
|
||||||
(api: DeriveApi, accountId: Uint8Array | string, withActive?: boolean) =>
|
(api: DeriveApi, accountId: Uint8Array | string, withActive?: boolean) =>
|
||||||
api.derive.staking.erasHistoric(withActive).pipe(
|
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[][]> {
|
export function stakerRewardsMultiEras (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], eras: EraIndex[]) => Observable<DeriveStakerReward[][]> {
|
||||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], eras: EraIndex[]): Observable<DeriveStakerReward[][]> =>
|
return memo(instanceId, (accountIds: (Uint8Array | string)[], eras: EraIndex[]): Observable<DeriveStakerReward[][]> =>
|
||||||
accountIds.length && eras.length
|
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[][]> {
|
export function stakerRewardsMulti (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], withActive?: boolean) => Observable<DeriveStakerReward[][]> {
|
||||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], withActive = false): Observable<DeriveStakerReward[][]> =>
|
return memo(instanceId, (accountIds: (Uint8Array | string)[], withActive = false): Observable<DeriveStakerReward[][]> =>
|
||||||
api.derive.staking.erasHistoric(withActive).pipe(
|
api.derive.staking.erasHistoric(withActive).pipe(
|
||||||
|
|||||||
@@ -25,4 +25,21 @@ export function _stakerSlashes (instanceId: string, api: DeriveApi): (accountId:
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name stakerSlashes
|
||||||
|
* @param { Uint8Array | string } accountId The stakers AccountId.
|
||||||
|
* @param { boolean } withActive Whether to include the active era.
|
||||||
|
* @description Retrieve the historical slashes (penalties) for a given staker.
|
||||||
|
* @example
|
||||||
|
* ```javascript
|
||||||
|
* const stakerSlashes = await api.derive.staking.stakerSlashes(
|
||||||
|
* ALICE, //Alice accountId
|
||||||
|
* true
|
||||||
|
* );
|
||||||
|
* console.log(
|
||||||
|
* 'Staker Slashes:',
|
||||||
|
* stakerSlashes.map(({ era, total }) => `Era ${era}: Slashed ${total.toString()}`)
|
||||||
|
* );
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
export const stakerSlashes = /*#__PURE__*/ erasHistoricApplyAccount('_stakerSlashes');
|
export const stakerSlashes = /*#__PURE__*/ erasHistoricApplyAccount('_stakerSlashes');
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user