@polkadot/api-augment 9.4.3 → 9.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/packageInfo.js +1 -1
- package/kusama/consts.d.ts +13 -4
- package/kusama/errors.d.ts +32 -0
- package/kusama/events.d.ts +87 -20
- package/kusama/query.d.ts +30 -1
- package/kusama/tx.d.ts +43 -0
- package/package.json +7 -7
- package/packageInfo.js +1 -1
- package/polkadot/consts.d.ts +13 -4
- package/polkadot/errors.d.ts +32 -0
- package/polkadot/events.d.ts +87 -20
- package/polkadot/query.d.ts +30 -1
- package/polkadot/tx.d.ts +43 -0
- package/substrate/consts.d.ts +20 -11
- package/substrate/errors.d.ts +4 -0
- package/substrate/events.d.ts +50 -22
- package/substrate/query.d.ts +2 -3
- package/substrate/tx.d.ts +226 -17
package/cjs/packageInfo.js
CHANGED
package/kusama/consts.d.ts
CHANGED
|
@@ -737,8 +737,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
737
737
|
*
|
|
738
738
|
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
|
|
739
739
|
* item `StakingLedger.claimed_rewards`. Setting this value lower than
|
|
740
|
-
* the existing value can lead to inconsistencies
|
|
741
|
-
* handled properly in a migration.
|
|
740
|
+
* the existing value can lead to inconsistencies in the
|
|
741
|
+
* `StakingLedger` and will need to be handled properly in a migration.
|
|
742
|
+
* The test `reducing_history_depth_abrupt` shows this effect.
|
|
742
743
|
**/
|
|
743
744
|
historyDepth: u32 & AugmentedConst<ApiType>;
|
|
744
745
|
/**
|
|
@@ -753,8 +754,16 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
753
754
|
**/
|
|
754
755
|
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
|
755
756
|
/**
|
|
756
|
-
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
|
757
|
-
* determines how many unique eras a staker may be
|
|
757
|
+
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
|
758
|
+
* have. Effectively determines how many unique eras a staker may be
|
|
759
|
+
* unbonding in.
|
|
760
|
+
*
|
|
761
|
+
* Note: `MaxUnlockingChunks` is used as the upper bound for the
|
|
762
|
+
* `BoundedVec` item `StakingLedger.unlocking`. Setting this value
|
|
763
|
+
* lower than the existing value can lead to inconsistencies in the
|
|
764
|
+
* `StakingLedger` and will need to be handled properly in a runtime
|
|
765
|
+
* migration. The test `reducing_max_unlocking_chunks_abrupt` shows
|
|
766
|
+
* this effect.
|
|
758
767
|
**/
|
|
759
768
|
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
|
760
769
|
/**
|
package/kusama/errors.d.ts
CHANGED
|
@@ -562,6 +562,38 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
562
562
|
**/
|
|
563
563
|
[key: string]: AugmentedError<ApiType>;
|
|
564
564
|
};
|
|
565
|
+
fastUnstake: {
|
|
566
|
+
/**
|
|
567
|
+
* The provided un-staker is already in Head, and cannot deregister.
|
|
568
|
+
**/
|
|
569
|
+
AlreadyHead: AugmentedError<ApiType>;
|
|
570
|
+
/**
|
|
571
|
+
* The bonded account has already been queued.
|
|
572
|
+
**/
|
|
573
|
+
AlreadyQueued: AugmentedError<ApiType>;
|
|
574
|
+
/**
|
|
575
|
+
* The call is not allowed at this point because the pallet is not active.
|
|
576
|
+
**/
|
|
577
|
+
CallNotAllowed: AugmentedError<ApiType>;
|
|
578
|
+
/**
|
|
579
|
+
* The provided Controller account was not found.
|
|
580
|
+
*
|
|
581
|
+
* This means that the given account is not bonded.
|
|
582
|
+
**/
|
|
583
|
+
NotController: AugmentedError<ApiType>;
|
|
584
|
+
/**
|
|
585
|
+
* The bonded account has active unlocking chunks.
|
|
586
|
+
**/
|
|
587
|
+
NotFullyBonded: AugmentedError<ApiType>;
|
|
588
|
+
/**
|
|
589
|
+
* The provided un-staker is not in the `Queue`.
|
|
590
|
+
**/
|
|
591
|
+
NotQueued: AugmentedError<ApiType>;
|
|
592
|
+
/**
|
|
593
|
+
* Generic error
|
|
594
|
+
**/
|
|
595
|
+
[key: string]: AugmentedError<ApiType>;
|
|
596
|
+
};
|
|
565
597
|
gilt: {
|
|
566
598
|
/**
|
|
567
599
|
* The amount of the bid is less than the minimum allowed.
|
package/kusama/events.d.ts
CHANGED
|
@@ -592,6 +592,44 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
592
592
|
**/
|
|
593
593
|
[key: string]: AugmentedEvent<ApiType>;
|
|
594
594
|
};
|
|
595
|
+
fastUnstake: {
|
|
596
|
+
/**
|
|
597
|
+
* A staker was partially checked for the given eras, but the process did not finish.
|
|
598
|
+
**/
|
|
599
|
+
Checking: AugmentedEvent<ApiType, [stash: AccountId32, eras: Vec<u32>], {
|
|
600
|
+
stash: AccountId32;
|
|
601
|
+
eras: Vec<u32>;
|
|
602
|
+
}>;
|
|
603
|
+
/**
|
|
604
|
+
* Some internal error happened while migrating stash. They are removed as head as a
|
|
605
|
+
* consequence.
|
|
606
|
+
**/
|
|
607
|
+
Errored: AugmentedEvent<ApiType, [stash: AccountId32], {
|
|
608
|
+
stash: AccountId32;
|
|
609
|
+
}>;
|
|
610
|
+
/**
|
|
611
|
+
* An internal error happened. Operations will be paused now.
|
|
612
|
+
**/
|
|
613
|
+
InternalError: AugmentedEvent<ApiType, []>;
|
|
614
|
+
/**
|
|
615
|
+
* A staker was slashed for requesting fast-unstake whilst being exposed.
|
|
616
|
+
**/
|
|
617
|
+
Slashed: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], {
|
|
618
|
+
stash: AccountId32;
|
|
619
|
+
amount: u128;
|
|
620
|
+
}>;
|
|
621
|
+
/**
|
|
622
|
+
* A staker was unstaked.
|
|
623
|
+
**/
|
|
624
|
+
Unstaked: AugmentedEvent<ApiType, [stash: AccountId32, result: Result<Null, SpRuntimeDispatchError>], {
|
|
625
|
+
stash: AccountId32;
|
|
626
|
+
result: Result<Null, SpRuntimeDispatchError>;
|
|
627
|
+
}>;
|
|
628
|
+
/**
|
|
629
|
+
* Generic event
|
|
630
|
+
**/
|
|
631
|
+
[key: string]: AugmentedEvent<ApiType>;
|
|
632
|
+
};
|
|
595
633
|
gilt: {
|
|
596
634
|
/**
|
|
597
635
|
* A bid was successfully placed.
|
|
@@ -1440,40 +1478,60 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
1440
1478
|
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
|
1441
1479
|
* it will not be emitted for staking rewards when they are added to stake.
|
|
1442
1480
|
**/
|
|
1443
|
-
Bonded: AugmentedEvent<ApiType, [AccountId32, u128]
|
|
1481
|
+
Bonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], {
|
|
1482
|
+
stash: AccountId32;
|
|
1483
|
+
amount: u128;
|
|
1484
|
+
}>;
|
|
1444
1485
|
/**
|
|
1445
1486
|
* An account has stopped participating as either a validator or nominator.
|
|
1446
|
-
* \[stash\]
|
|
1447
1487
|
**/
|
|
1448
|
-
Chilled: AugmentedEvent<ApiType, [AccountId32]
|
|
1488
|
+
Chilled: AugmentedEvent<ApiType, [stash: AccountId32], {
|
|
1489
|
+
stash: AccountId32;
|
|
1490
|
+
}>;
|
|
1449
1491
|
/**
|
|
1450
1492
|
* The era payout has been set; the first balance is the validator-payout; the second is
|
|
1451
1493
|
* the remainder from the maximum amount of reward.
|
|
1452
|
-
* \[era_index, validator_payout, remainder\]
|
|
1453
1494
|
**/
|
|
1454
|
-
EraPaid: AugmentedEvent<ApiType, [u32, u128, u128]
|
|
1495
|
+
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], {
|
|
1496
|
+
eraIndex: u32;
|
|
1497
|
+
validatorPayout: u128;
|
|
1498
|
+
remainder: u128;
|
|
1499
|
+
}>;
|
|
1455
1500
|
/**
|
|
1456
|
-
* A nominator has been kicked from a validator.
|
|
1501
|
+
* A nominator has been kicked from a validator.
|
|
1457
1502
|
**/
|
|
1458
|
-
Kicked: AugmentedEvent<ApiType, [AccountId32, AccountId32]
|
|
1503
|
+
Kicked: AugmentedEvent<ApiType, [nominator: AccountId32, stash: AccountId32], {
|
|
1504
|
+
nominator: AccountId32;
|
|
1505
|
+
stash: AccountId32;
|
|
1506
|
+
}>;
|
|
1459
1507
|
/**
|
|
1460
1508
|
* An old slashing report from a prior era was discarded because it could
|
|
1461
|
-
* not be processed.
|
|
1509
|
+
* not be processed.
|
|
1462
1510
|
**/
|
|
1463
|
-
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [u32]
|
|
1511
|
+
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [sessionIndex: u32], {
|
|
1512
|
+
sessionIndex: u32;
|
|
1513
|
+
}>;
|
|
1464
1514
|
/**
|
|
1465
|
-
* The stakers' rewards are getting paid.
|
|
1515
|
+
* The stakers' rewards are getting paid.
|
|
1466
1516
|
**/
|
|
1467
|
-
PayoutStarted: AugmentedEvent<ApiType, [u32, AccountId32]
|
|
1517
|
+
PayoutStarted: AugmentedEvent<ApiType, [eraIndex: u32, validatorStash: AccountId32], {
|
|
1518
|
+
eraIndex: u32;
|
|
1519
|
+
validatorStash: AccountId32;
|
|
1520
|
+
}>;
|
|
1468
1521
|
/**
|
|
1469
|
-
* The nominator has been rewarded by this amount.
|
|
1522
|
+
* The nominator has been rewarded by this amount.
|
|
1470
1523
|
**/
|
|
1471
|
-
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]
|
|
1524
|
+
Rewarded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], {
|
|
1525
|
+
stash: AccountId32;
|
|
1526
|
+
amount: u128;
|
|
1527
|
+
}>;
|
|
1472
1528
|
/**
|
|
1473
1529
|
* One staker (and potentially its nominators) has been slashed by the given amount.
|
|
1474
|
-
* \[staker, amount\]
|
|
1475
1530
|
**/
|
|
1476
|
-
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]
|
|
1531
|
+
Slashed: AugmentedEvent<ApiType, [staker: AccountId32, amount: u128], {
|
|
1532
|
+
staker: AccountId32;
|
|
1533
|
+
amount: u128;
|
|
1534
|
+
}>;
|
|
1477
1535
|
/**
|
|
1478
1536
|
* A new set of stakers was elected.
|
|
1479
1537
|
**/
|
|
@@ -1483,18 +1541,27 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
1483
1541
|
**/
|
|
1484
1542
|
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
|
1485
1543
|
/**
|
|
1486
|
-
* An account has unbonded this amount.
|
|
1544
|
+
* An account has unbonded this amount.
|
|
1487
1545
|
**/
|
|
1488
|
-
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]
|
|
1546
|
+
Unbonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], {
|
|
1547
|
+
stash: AccountId32;
|
|
1548
|
+
amount: u128;
|
|
1549
|
+
}>;
|
|
1489
1550
|
/**
|
|
1490
1551
|
* A validator has set their preferences.
|
|
1491
1552
|
**/
|
|
1492
|
-
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]
|
|
1553
|
+
ValidatorPrefsSet: AugmentedEvent<ApiType, [stash: AccountId32, prefs: PalletStakingValidatorPrefs], {
|
|
1554
|
+
stash: AccountId32;
|
|
1555
|
+
prefs: PalletStakingValidatorPrefs;
|
|
1556
|
+
}>;
|
|
1493
1557
|
/**
|
|
1494
1558
|
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
|
1495
|
-
* from the unlocking queue.
|
|
1559
|
+
* from the unlocking queue.
|
|
1496
1560
|
**/
|
|
1497
|
-
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u128]
|
|
1561
|
+
Withdrawn: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], {
|
|
1562
|
+
stash: AccountId32;
|
|
1563
|
+
amount: u128;
|
|
1564
|
+
}>;
|
|
1498
1565
|
/**
|
|
1499
1566
|
* Generic event
|
|
1500
1567
|
**/
|
package/kusama/query.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
|
|
|
5
5
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
|
6
6
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
|
7
7
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
|
8
|
-
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
|
8
|
+
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
|
9
9
|
import type { Observable } from '@polkadot/types/types';
|
|
10
10
|
export declare type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
|
11
11
|
export declare type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;
|
|
@@ -535,6 +535,35 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
535
535
|
**/
|
|
536
536
|
[key: string]: QueryableStorageEntry<ApiType>;
|
|
537
537
|
};
|
|
538
|
+
fastUnstake: {
|
|
539
|
+
/**
|
|
540
|
+
* Counter for the related counted storage map
|
|
541
|
+
**/
|
|
542
|
+
counterForQueue: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
|
543
|
+
/**
|
|
544
|
+
* Number of eras to check per block.
|
|
545
|
+
*
|
|
546
|
+
* If set to 0, this pallet does absolutely nothing.
|
|
547
|
+
*
|
|
548
|
+
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
|
|
549
|
+
* nominator might be checked.
|
|
550
|
+
**/
|
|
551
|
+
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
|
552
|
+
/**
|
|
553
|
+
* The current "head of the queue" being unstaked.
|
|
554
|
+
**/
|
|
555
|
+
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
|
|
556
|
+
/**
|
|
557
|
+
* The map of all accounts wishing to be unstaked.
|
|
558
|
+
*
|
|
559
|
+
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
|
560
|
+
**/
|
|
561
|
+
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
|
562
|
+
/**
|
|
563
|
+
* Generic query
|
|
564
|
+
**/
|
|
565
|
+
[key: string]: QueryableStorageEntry<ApiType>;
|
|
566
|
+
};
|
|
538
567
|
gilt: {
|
|
539
568
|
/**
|
|
540
569
|
* The currently active gilts, indexed according to the order of creation.
|
package/kusama/tx.d.ts
CHANGED
|
@@ -1612,6 +1612,49 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
1612
1612
|
**/
|
|
1613
1613
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
1614
1614
|
};
|
|
1615
|
+
fastUnstake: {
|
|
1616
|
+
/**
|
|
1617
|
+
* Control the operation of this pallet.
|
|
1618
|
+
*
|
|
1619
|
+
* Dispatch origin must be signed by the [`Config::ControlOrigin`].
|
|
1620
|
+
**/
|
|
1621
|
+
control: AugmentedSubmittable<(uncheckedErasToCheck: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
|
1622
|
+
/**
|
|
1623
|
+
* Deregister oneself from the fast-unstake.
|
|
1624
|
+
*
|
|
1625
|
+
* This is useful if one is registered, they are still waiting, and they change their mind.
|
|
1626
|
+
*
|
|
1627
|
+
* Note that the associated stash is still fully unbonded and chilled as a consequence of
|
|
1628
|
+
* calling `register_fast_unstake`. This should probably be followed by a call to
|
|
1629
|
+
* `Staking::rebond`.
|
|
1630
|
+
**/
|
|
1631
|
+
deregister: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
1632
|
+
/**
|
|
1633
|
+
* Register oneself for fast-unstake.
|
|
1634
|
+
*
|
|
1635
|
+
* The dispatch origin of this call must be signed by the controller account, similar to
|
|
1636
|
+
* `staking::unbond`.
|
|
1637
|
+
*
|
|
1638
|
+
* The stash associated with the origin must have no ongoing unlocking chunks. If
|
|
1639
|
+
* successful, this will fully unbond and chill the stash. Then, it will enqueue the stash
|
|
1640
|
+
* to be checked in further blocks.
|
|
1641
|
+
*
|
|
1642
|
+
* If by the time this is called, the stash is actually eligible for fast-unstake, then
|
|
1643
|
+
* they are guaranteed to remain eligible, because the call will chill them as well.
|
|
1644
|
+
*
|
|
1645
|
+
* If the check works, the entire staking data is removed, i.e. the stash is fully
|
|
1646
|
+
* unstaked.
|
|
1647
|
+
*
|
|
1648
|
+
* If the check fails, the stash remains chilled and waiting for being unbonded as in with
|
|
1649
|
+
* the normal staking system, but they lose part of their unbonding chunks due to consuming
|
|
1650
|
+
* the chain's resources.
|
|
1651
|
+
**/
|
|
1652
|
+
registerFastUnstake: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
1653
|
+
/**
|
|
1654
|
+
* Generic tx
|
|
1655
|
+
**/
|
|
1656
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
1657
|
+
};
|
|
1615
1658
|
gilt: {
|
|
1616
1659
|
/**
|
|
1617
1660
|
* Place a bid for a gilt to be issued.
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"./cjs/detectPackage.js"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "9.
|
|
23
|
+
"version": "9.5.1",
|
|
24
24
|
"main": "./cjs/index.js",
|
|
25
25
|
"module": "./index.js",
|
|
26
26
|
"types": "./index.d.ts",
|
|
@@ -186,11 +186,11 @@
|
|
|
186
186
|
},
|
|
187
187
|
"dependencies": {
|
|
188
188
|
"@babel/runtime": "^7.19.0",
|
|
189
|
-
"@polkadot/api-base": "9.
|
|
190
|
-
"@polkadot/rpc-augment": "9.
|
|
191
|
-
"@polkadot/types": "9.
|
|
192
|
-
"@polkadot/types-augment": "9.
|
|
193
|
-
"@polkadot/types-codec": "9.
|
|
194
|
-
"@polkadot/util": "^10.1.
|
|
189
|
+
"@polkadot/api-base": "9.5.1",
|
|
190
|
+
"@polkadot/rpc-augment": "9.5.1",
|
|
191
|
+
"@polkadot/types": "9.5.1",
|
|
192
|
+
"@polkadot/types-augment": "9.5.1",
|
|
193
|
+
"@polkadot/types-codec": "9.5.1",
|
|
194
|
+
"@polkadot/util": "^10.1.10"
|
|
195
195
|
}
|
|
196
196
|
}
|
package/packageInfo.js
CHANGED
|
@@ -5,5 +5,5 @@ export const packageInfo = {
|
|
|
5
5
|
name: '@polkadot/api-augment',
|
|
6
6
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
7
7
|
type: 'esm',
|
|
8
|
-
version: '9.
|
|
8
|
+
version: '9.5.1'
|
|
9
9
|
};
|
package/polkadot/consts.d.ts
CHANGED
|
@@ -604,8 +604,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
604
604
|
*
|
|
605
605
|
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
|
|
606
606
|
* item `StakingLedger.claimed_rewards`. Setting this value lower than
|
|
607
|
-
* the existing value can lead to inconsistencies
|
|
608
|
-
* handled properly in a migration.
|
|
607
|
+
* the existing value can lead to inconsistencies in the
|
|
608
|
+
* `StakingLedger` and will need to be handled properly in a migration.
|
|
609
|
+
* The test `reducing_history_depth_abrupt` shows this effect.
|
|
609
610
|
**/
|
|
610
611
|
historyDepth: u32 & AugmentedConst<ApiType>;
|
|
611
612
|
/**
|
|
@@ -620,8 +621,16 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
620
621
|
**/
|
|
621
622
|
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
|
622
623
|
/**
|
|
623
|
-
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
|
624
|
-
* determines how many unique eras a staker may be
|
|
624
|
+
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
|
625
|
+
* have. Effectively determines how many unique eras a staker may be
|
|
626
|
+
* unbonding in.
|
|
627
|
+
*
|
|
628
|
+
* Note: `MaxUnlockingChunks` is used as the upper bound for the
|
|
629
|
+
* `BoundedVec` item `StakingLedger.unlocking`. Setting this value
|
|
630
|
+
* lower than the existing value can lead to inconsistencies in the
|
|
631
|
+
* `StakingLedger` and will need to be handled properly in a runtime
|
|
632
|
+
* migration. The test `reducing_max_unlocking_chunks_abrupt` shows
|
|
633
|
+
* this effect.
|
|
625
634
|
**/
|
|
626
635
|
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
|
627
636
|
/**
|
package/polkadot/errors.d.ts
CHANGED
|
@@ -562,6 +562,38 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
562
562
|
**/
|
|
563
563
|
[key: string]: AugmentedError<ApiType>;
|
|
564
564
|
};
|
|
565
|
+
fastUnstake: {
|
|
566
|
+
/**
|
|
567
|
+
* The provided un-staker is already in Head, and cannot deregister.
|
|
568
|
+
**/
|
|
569
|
+
AlreadyHead: AugmentedError<ApiType>;
|
|
570
|
+
/**
|
|
571
|
+
* The bonded account has already been queued.
|
|
572
|
+
**/
|
|
573
|
+
AlreadyQueued: AugmentedError<ApiType>;
|
|
574
|
+
/**
|
|
575
|
+
* The call is not allowed at this point because the pallet is not active.
|
|
576
|
+
**/
|
|
577
|
+
CallNotAllowed: AugmentedError<ApiType>;
|
|
578
|
+
/**
|
|
579
|
+
* The provided Controller account was not found.
|
|
580
|
+
*
|
|
581
|
+
* This means that the given account is not bonded.
|
|
582
|
+
**/
|
|
583
|
+
NotController: AugmentedError<ApiType>;
|
|
584
|
+
/**
|
|
585
|
+
* The bonded account has active unlocking chunks.
|
|
586
|
+
**/
|
|
587
|
+
NotFullyBonded: AugmentedError<ApiType>;
|
|
588
|
+
/**
|
|
589
|
+
* The provided un-staker is not in the `Queue`.
|
|
590
|
+
**/
|
|
591
|
+
NotQueued: AugmentedError<ApiType>;
|
|
592
|
+
/**
|
|
593
|
+
* Generic error
|
|
594
|
+
**/
|
|
595
|
+
[key: string]: AugmentedError<ApiType>;
|
|
596
|
+
};
|
|
565
597
|
grandpa: {
|
|
566
598
|
/**
|
|
567
599
|
* Attempt to signal GRANDPA change with one already pending.
|
package/polkadot/events.d.ts
CHANGED
|
@@ -592,6 +592,44 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
592
592
|
**/
|
|
593
593
|
[key: string]: AugmentedEvent<ApiType>;
|
|
594
594
|
};
|
|
595
|
+
fastUnstake: {
|
|
596
|
+
/**
|
|
597
|
+
* A staker was partially checked for the given eras, but the process did not finish.
|
|
598
|
+
**/
|
|
599
|
+
Checking: AugmentedEvent<ApiType, [stash: AccountId32, eras: Vec<u32>], {
|
|
600
|
+
stash: AccountId32;
|
|
601
|
+
eras: Vec<u32>;
|
|
602
|
+
}>;
|
|
603
|
+
/**
|
|
604
|
+
* Some internal error happened while migrating stash. They are removed as head as a
|
|
605
|
+
* consequence.
|
|
606
|
+
**/
|
|
607
|
+
Errored: AugmentedEvent<ApiType, [stash: AccountId32], {
|
|
608
|
+
stash: AccountId32;
|
|
609
|
+
}>;
|
|
610
|
+
/**
|
|
611
|
+
* An internal error happened. Operations will be paused now.
|
|
612
|
+
**/
|
|
613
|
+
InternalError: AugmentedEvent<ApiType, []>;
|
|
614
|
+
/**
|
|
615
|
+
* A staker was slashed for requesting fast-unstake whilst being exposed.
|
|
616
|
+
**/
|
|
617
|
+
Slashed: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], {
|
|
618
|
+
stash: AccountId32;
|
|
619
|
+
amount: u128;
|
|
620
|
+
}>;
|
|
621
|
+
/**
|
|
622
|
+
* A staker was unstaked.
|
|
623
|
+
**/
|
|
624
|
+
Unstaked: AugmentedEvent<ApiType, [stash: AccountId32, result: Result<Null, SpRuntimeDispatchError>], {
|
|
625
|
+
stash: AccountId32;
|
|
626
|
+
result: Result<Null, SpRuntimeDispatchError>;
|
|
627
|
+
}>;
|
|
628
|
+
/**
|
|
629
|
+
* Generic event
|
|
630
|
+
**/
|
|
631
|
+
[key: string]: AugmentedEvent<ApiType>;
|
|
632
|
+
};
|
|
595
633
|
grandpa: {
|
|
596
634
|
/**
|
|
597
635
|
* New authority set has been applied.
|
|
@@ -1240,40 +1278,60 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
1240
1278
|
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
|
1241
1279
|
* it will not be emitted for staking rewards when they are added to stake.
|
|
1242
1280
|
**/
|
|
1243
|
-
Bonded: AugmentedEvent<ApiType, [AccountId32, u128]
|
|
1281
|
+
Bonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], {
|
|
1282
|
+
stash: AccountId32;
|
|
1283
|
+
amount: u128;
|
|
1284
|
+
}>;
|
|
1244
1285
|
/**
|
|
1245
1286
|
* An account has stopped participating as either a validator or nominator.
|
|
1246
|
-
* \[stash\]
|
|
1247
1287
|
**/
|
|
1248
|
-
Chilled: AugmentedEvent<ApiType, [AccountId32]
|
|
1288
|
+
Chilled: AugmentedEvent<ApiType, [stash: AccountId32], {
|
|
1289
|
+
stash: AccountId32;
|
|
1290
|
+
}>;
|
|
1249
1291
|
/**
|
|
1250
1292
|
* The era payout has been set; the first balance is the validator-payout; the second is
|
|
1251
1293
|
* the remainder from the maximum amount of reward.
|
|
1252
|
-
* \[era_index, validator_payout, remainder\]
|
|
1253
1294
|
**/
|
|
1254
|
-
EraPaid: AugmentedEvent<ApiType, [u32, u128, u128]
|
|
1295
|
+
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], {
|
|
1296
|
+
eraIndex: u32;
|
|
1297
|
+
validatorPayout: u128;
|
|
1298
|
+
remainder: u128;
|
|
1299
|
+
}>;
|
|
1255
1300
|
/**
|
|
1256
|
-
* A nominator has been kicked from a validator.
|
|
1301
|
+
* A nominator has been kicked from a validator.
|
|
1257
1302
|
**/
|
|
1258
|
-
Kicked: AugmentedEvent<ApiType, [AccountId32, AccountId32]
|
|
1303
|
+
Kicked: AugmentedEvent<ApiType, [nominator: AccountId32, stash: AccountId32], {
|
|
1304
|
+
nominator: AccountId32;
|
|
1305
|
+
stash: AccountId32;
|
|
1306
|
+
}>;
|
|
1259
1307
|
/**
|
|
1260
1308
|
* An old slashing report from a prior era was discarded because it could
|
|
1261
|
-
* not be processed.
|
|
1309
|
+
* not be processed.
|
|
1262
1310
|
**/
|
|
1263
|
-
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [u32]
|
|
1311
|
+
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [sessionIndex: u32], {
|
|
1312
|
+
sessionIndex: u32;
|
|
1313
|
+
}>;
|
|
1264
1314
|
/**
|
|
1265
|
-
* The stakers' rewards are getting paid.
|
|
1315
|
+
* The stakers' rewards are getting paid.
|
|
1266
1316
|
**/
|
|
1267
|
-
PayoutStarted: AugmentedEvent<ApiType, [u32, AccountId32]
|
|
1317
|
+
PayoutStarted: AugmentedEvent<ApiType, [eraIndex: u32, validatorStash: AccountId32], {
|
|
1318
|
+
eraIndex: u32;
|
|
1319
|
+
validatorStash: AccountId32;
|
|
1320
|
+
}>;
|
|
1268
1321
|
/**
|
|
1269
|
-
* The nominator has been rewarded by this amount.
|
|
1322
|
+
* The nominator has been rewarded by this amount.
|
|
1270
1323
|
**/
|
|
1271
|
-
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]
|
|
1324
|
+
Rewarded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], {
|
|
1325
|
+
stash: AccountId32;
|
|
1326
|
+
amount: u128;
|
|
1327
|
+
}>;
|
|
1272
1328
|
/**
|
|
1273
1329
|
* One staker (and potentially its nominators) has been slashed by the given amount.
|
|
1274
|
-
* \[staker, amount\]
|
|
1275
1330
|
**/
|
|
1276
|
-
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]
|
|
1331
|
+
Slashed: AugmentedEvent<ApiType, [staker: AccountId32, amount: u128], {
|
|
1332
|
+
staker: AccountId32;
|
|
1333
|
+
amount: u128;
|
|
1334
|
+
}>;
|
|
1277
1335
|
/**
|
|
1278
1336
|
* A new set of stakers was elected.
|
|
1279
1337
|
**/
|
|
@@ -1283,18 +1341,27 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
1283
1341
|
**/
|
|
1284
1342
|
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
|
1285
1343
|
/**
|
|
1286
|
-
* An account has unbonded this amount.
|
|
1344
|
+
* An account has unbonded this amount.
|
|
1287
1345
|
**/
|
|
1288
|
-
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]
|
|
1346
|
+
Unbonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], {
|
|
1347
|
+
stash: AccountId32;
|
|
1348
|
+
amount: u128;
|
|
1349
|
+
}>;
|
|
1289
1350
|
/**
|
|
1290
1351
|
* A validator has set their preferences.
|
|
1291
1352
|
**/
|
|
1292
|
-
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]
|
|
1353
|
+
ValidatorPrefsSet: AugmentedEvent<ApiType, [stash: AccountId32, prefs: PalletStakingValidatorPrefs], {
|
|
1354
|
+
stash: AccountId32;
|
|
1355
|
+
prefs: PalletStakingValidatorPrefs;
|
|
1356
|
+
}>;
|
|
1293
1357
|
/**
|
|
1294
1358
|
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
|
1295
|
-
* from the unlocking queue.
|
|
1359
|
+
* from the unlocking queue.
|
|
1296
1360
|
**/
|
|
1297
|
-
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u128]
|
|
1361
|
+
Withdrawn: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], {
|
|
1362
|
+
stash: AccountId32;
|
|
1363
|
+
amount: u128;
|
|
1364
|
+
}>;
|
|
1298
1365
|
/**
|
|
1299
1366
|
* Generic event
|
|
1300
1367
|
**/
|