@polkadot/api-augment 15.9.3 → 15.10.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.
@@ -2,8 +2,8 @@ import '@polkadot/api-base/types/consts';
2
2
  import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
3
3
  import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
4
4
  import type { Codec, ITuple } from '@polkadot/types-codec/types';
5
- import type { Perbill, Percent, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
6
- import type { FrameSupportPalletId, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsEnvironment, PalletContractsSchedule, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
5
+ import type { AccountId32, Perbill, Percent, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
6
+ import type { FrameSupportPalletId, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsEnvironment, PalletContractsSchedule, PalletReferendaTrackDetails, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
7
7
  export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
8
8
  declare module '@polkadot/api-base/types/consts' {
9
9
  interface AugmentedConsts<ApiType extends ApiTypes> {
@@ -77,6 +77,18 @@ declare module '@polkadot/api-base/types/consts' {
77
77
  **/
78
78
  [key: string]: Codec;
79
79
  };
80
+ assetRewards: {
81
+ /**
82
+ * The pallet's unique identifier, used to derive the pool's account ID.
83
+ *
84
+ * The account ID is derived once during pool creation and stored in the storage.
85
+ **/
86
+ palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
87
+ /**
88
+ * Generic const
89
+ **/
90
+ [key: string]: Codec;
91
+ };
80
92
  assets: {
81
93
  /**
82
94
  * The amount of funds that must be reserved when creating a new approval.
@@ -210,7 +222,12 @@ declare module '@polkadot/api-base/types/consts' {
210
222
  **/
211
223
  bountyDepositPayoutDelay: u32 & AugmentedConst<ApiType>;
212
224
  /**
213
- * Bounty duration in blocks.
225
+ * The time limit for a curator to act before a bounty expires.
226
+ *
227
+ * The period that starts when a curator is approved, during which they must execute or
228
+ * update the bounty via `extend_bounty_expiry`. If missed, the bounty expires, and the
229
+ * curator may be slashed. If `BlockNumberFor::MAX`, bounties stay active indefinitely,
230
+ * removing the need for `extend_bounty_expiry`.
214
231
  **/
215
232
  bountyUpdatePeriod: u32 & AugmentedConst<ApiType>;
216
233
  /**
@@ -248,6 +265,9 @@ declare module '@polkadot/api-base/types/consts' {
248
265
  [key: string]: Codec;
249
266
  };
250
267
  broker: {
268
+ /**
269
+ * Given that we are performing all auto-renewals in a single block, it has to be limited.
270
+ **/
251
271
  maxAutoRenewals: u32 & AugmentedConst<ApiType>;
252
272
  /**
253
273
  * Maximum number of legacy leases.
@@ -257,6 +277,12 @@ declare module '@polkadot/api-base/types/consts' {
257
277
  * Maximum number of system cores.
258
278
  **/
259
279
  maxReservedCores: u32 & AugmentedConst<ApiType>;
280
+ /**
281
+ * The smallest amount of credits a user can purchase.
282
+ *
283
+ * Needed to prevent spam attacks.
284
+ **/
285
+ minimumCreditPurchase: u128 & AugmentedConst<ApiType>;
260
286
  /**
261
287
  * Identifier from which the internal Pot is generated.
262
288
  **/
@@ -418,6 +444,20 @@ declare module '@polkadot/api-base/types/consts' {
418
444
  **/
419
445
  [key: string]: Codec;
420
446
  };
447
+ delegatedStaking: {
448
+ /**
449
+ * Injected identifier for the pallet.
450
+ **/
451
+ palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
452
+ /**
453
+ * Fraction of the slash that is rewarded to the caller of pending slash to the agent.
454
+ **/
455
+ slashRewardFraction: Perbill & AugmentedConst<ApiType>;
456
+ /**
457
+ * Generic const
458
+ **/
459
+ [key: string]: Codec;
460
+ };
421
461
  democracy: {
422
462
  /**
423
463
  * Period in blocks where an external proposal may not be re-submitted after being vetoed.
@@ -1156,9 +1196,11 @@ declare module '@polkadot/api-base/types/consts' {
1156
1196
  **/
1157
1197
  submissionDeposit: u128 & AugmentedConst<ApiType>;
1158
1198
  /**
1159
- * Information concerning the different referendum tracks.
1199
+ * A list of tracks.
1200
+ *
1201
+ * Note: if the tracks are dynamic, the value in the static metadata might be inaccurate.
1160
1202
  **/
1161
- tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
1203
+ tracks: Vec<ITuple<[u16, PalletReferendaTrackDetails]>> & AugmentedConst<ApiType>;
1162
1204
  /**
1163
1205
  * The number of blocks after submission that a referendum must begin being decided by.
1164
1206
  * Once this passes, then anyone may cancel the referendum.
@@ -1225,9 +1267,11 @@ declare module '@polkadot/api-base/types/consts' {
1225
1267
  **/
1226
1268
  submissionDeposit: u128 & AugmentedConst<ApiType>;
1227
1269
  /**
1228
- * Information concerning the different referendum tracks.
1270
+ * A list of tracks.
1271
+ *
1272
+ * Note: if the tracks are dynamic, the value in the static metadata might be inaccurate.
1229
1273
  **/
1230
- tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
1274
+ tracks: Vec<ITuple<[u16, PalletReferendaTrackDetails]>> & AugmentedConst<ApiType>;
1231
1275
  /**
1232
1276
  * The number of blocks after submission that a referendum must begin being decided by.
1233
1277
  * Once this passes, then anyone may cancel the referendum.
@@ -1239,7 +1283,6 @@ declare module '@polkadot/api-base/types/consts' {
1239
1283
  [key: string]: Codec;
1240
1284
  };
1241
1285
  revive: {
1242
- apiVersion: u16 & AugmentedConst<ApiType>;
1243
1286
  /**
1244
1287
  * The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID.
1245
1288
  *
@@ -1249,9 +1292,8 @@ declare module '@polkadot/api-base/types/consts' {
1249
1292
  chainId: u64 & AugmentedConst<ApiType>;
1250
1293
  /**
1251
1294
  * The percentage of the storage deposit that should be held for using a code hash.
1252
- * Instantiating a contract, or calling [`chain_extension::Ext::lock_delegate_dependency`]
1253
- * protects the code from being removed. In order to prevent abuse these actions are
1254
- * protected with a percentage of the code deposit.
1295
+ * Instantiating a contract, protects the code from being removed. In order to prevent
1296
+ * abuse these actions are protected with a percentage of the code deposit.
1255
1297
  **/
1256
1298
  codeHashLockupDepositPercent: Perbill & AugmentedConst<ApiType>;
1257
1299
  /**
@@ -1693,6 +1735,10 @@ declare module '@polkadot/api-base/types/consts' {
1693
1735
  * The period during which an approved treasury spend has to be claimed.
1694
1736
  **/
1695
1737
  payoutPeriod: u32 & AugmentedConst<ApiType>;
1738
+ /**
1739
+ * Gets this pallet's derived pot account.
1740
+ **/
1741
+ potAccount: AccountId32 & AugmentedConst<ApiType>;
1696
1742
  /**
1697
1743
  * Period between successive spends.
1698
1744
  **/
@@ -301,6 +301,52 @@ declare module '@polkadot/api-base/types/errors' {
301
301
  **/
302
302
  [key: string]: AugmentedError<ApiType>;
303
303
  };
304
+ assetRewards: {
305
+ /**
306
+ * There was an error converting a block number.
307
+ **/
308
+ BlockNumberConversionError: AugmentedError<ApiType>;
309
+ /**
310
+ * The expiry block must be in the future.
311
+ **/
312
+ ExpiryBlockMustBeInTheFuture: AugmentedError<ApiType>;
313
+ /**
314
+ * The expiry block can be only extended.
315
+ **/
316
+ ExpiryCut: AugmentedError<ApiType>;
317
+ /**
318
+ * Insufficient funds to create the freeze.
319
+ **/
320
+ InsufficientFunds: AugmentedError<ApiType>;
321
+ /**
322
+ * The pool still has staked tokens or rewards.
323
+ **/
324
+ NonEmptyPool: AugmentedError<ApiType>;
325
+ /**
326
+ * An operation was attempted with a non-existent asset.
327
+ **/
328
+ NonExistentAsset: AugmentedError<ApiType>;
329
+ /**
330
+ * An operation was attempted on a non-existent pool.
331
+ **/
332
+ NonExistentPool: AugmentedError<ApiType>;
333
+ /**
334
+ * An operation was attempted for a non-existent staker.
335
+ **/
336
+ NonExistentStaker: AugmentedError<ApiType>;
337
+ /**
338
+ * The staker does not have enough tokens to perform the operation.
339
+ **/
340
+ NotEnoughTokens: AugmentedError<ApiType>;
341
+ /**
342
+ * The reward rate per block can be only increased.
343
+ **/
344
+ RewardRateCut: AugmentedError<ApiType>;
345
+ /**
346
+ * Generic error
347
+ **/
348
+ [key: string]: AugmentedError<ApiType>;
349
+ };
304
350
  assets: {
305
351
  /**
306
352
  * The asset-account already exists.
@@ -330,6 +376,14 @@ declare module '@polkadot/api-base/types/errors' {
330
376
  * Callback action resulted in error
331
377
  **/
332
378
  CallbackFailed: AugmentedError<ApiType>;
379
+ /**
380
+ * The asset cannot be destroyed because some accounts for this asset contain freezes.
381
+ **/
382
+ ContainsFreezes: AugmentedError<ApiType>;
383
+ /**
384
+ * The asset cannot be destroyed because some accounts for this asset contain holds.
385
+ **/
386
+ ContainsHolds: AugmentedError<ApiType>;
333
387
  /**
334
388
  * The origin account is frozen.
335
389
  **/
@@ -394,6 +448,16 @@ declare module '@polkadot/api-base/types/errors' {
394
448
  **/
395
449
  [key: string]: AugmentedError<ApiType>;
396
450
  };
451
+ assetsFreezer: {
452
+ /**
453
+ * Number of freezes on an account would exceed `MaxFreezes`.
454
+ **/
455
+ TooManyFreezes: AugmentedError<ApiType>;
456
+ /**
457
+ * Generic error
458
+ **/
459
+ [key: string]: AugmentedError<ApiType>;
460
+ };
397
461
  babe: {
398
462
  /**
399
463
  * A given equivocation report is valid but already previously reported.
@@ -560,6 +624,10 @@ declare module '@polkadot/api-base/types/errors' {
560
624
  * The lease expiry time has already passed.
561
625
  **/
562
626
  AlreadyExpired: AugmentedError<ApiType>;
627
+ /**
628
+ * Attempted to force remove an assignment that doesn't exist.
629
+ **/
630
+ AssignmentNotFound: AugmentedError<ApiType>;
563
631
  /**
564
632
  * Attempted to disable auto-renewal for a core that didn't have it enabled.
565
633
  **/
@@ -572,6 +640,11 @@ declare module '@polkadot/api-base/types/errors' {
572
640
  * The workplan of the pallet's state is invalid. This indicates a state corruption.
573
641
  **/
574
642
  CorruptWorkplan: AugmentedError<ApiType>;
643
+ /**
644
+ * Needed to prevent spam attacks.The amount of credits the user attempted to purchase is
645
+ * below `T::MinimumCreditPurchase`.
646
+ **/
647
+ CreditPurchaseTooSmall: AugmentedError<ApiType>;
575
648
  /**
576
649
  * The pivot mask for the interlacing is not contained within the region's interlace mask.
577
650
  **/
@@ -585,6 +658,10 @@ declare module '@polkadot/api-base/types/errors' {
585
658
  * The configuration could not be applied because it is invalid.
586
659
  **/
587
660
  InvalidConfig: AugmentedError<ApiType>;
661
+ /**
662
+ * The lease does not exist.
663
+ **/
664
+ LeaseNotFound: AugmentedError<ApiType>;
588
665
  /**
589
666
  * The revenue must be claimed for 1 or more timeslices.
590
667
  **/
@@ -1046,6 +1123,64 @@ declare module '@polkadot/api-base/types/errors' {
1046
1123
  **/
1047
1124
  [key: string]: AugmentedError<ApiType>;
1048
1125
  };
1126
+ delegatedStaking: {
1127
+ /**
1128
+ * An existing staker cannot perform this action.
1129
+ **/
1130
+ AlreadyStaking: AugmentedError<ApiType>;
1131
+ /**
1132
+ * Some corruption in internal state.
1133
+ **/
1134
+ BadState: AugmentedError<ApiType>;
1135
+ /**
1136
+ * Delegation conditions are not met.
1137
+ *
1138
+ * Possible issues are
1139
+ * 1) Cannot delegate to self,
1140
+ * 2) Cannot delegate to multiple delegates.
1141
+ **/
1142
+ InvalidDelegation: AugmentedError<ApiType>;
1143
+ /**
1144
+ * Reward Destination cannot be same as `Agent` account.
1145
+ **/
1146
+ InvalidRewardDestination: AugmentedError<ApiType>;
1147
+ /**
1148
+ * Not an existing `Agent` account.
1149
+ **/
1150
+ NotAgent: AugmentedError<ApiType>;
1151
+ /**
1152
+ * The account cannot perform this operation.
1153
+ **/
1154
+ NotAllowed: AugmentedError<ApiType>;
1155
+ /**
1156
+ * Not a Delegator account.
1157
+ **/
1158
+ NotDelegator: AugmentedError<ApiType>;
1159
+ /**
1160
+ * The account does not have enough funds to perform the operation.
1161
+ **/
1162
+ NotEnoughFunds: AugmentedError<ApiType>;
1163
+ /**
1164
+ * `Agent` has no pending slash to be applied.
1165
+ **/
1166
+ NothingToSlash: AugmentedError<ApiType>;
1167
+ /**
1168
+ * Operation not supported by this pallet.
1169
+ **/
1170
+ NotSupported: AugmentedError<ApiType>;
1171
+ /**
1172
+ * Unapplied pending slash restricts operation on `Agent`.
1173
+ **/
1174
+ UnappliedSlash: AugmentedError<ApiType>;
1175
+ /**
1176
+ * Failed to withdraw amount from Core Staking.
1177
+ **/
1178
+ WithdrawFailed: AugmentedError<ApiType>;
1179
+ /**
1180
+ * Generic error
1181
+ **/
1182
+ [key: string]: AugmentedError<ApiType>;
1183
+ };
1049
1184
  democracy: {
1050
1185
  /**
1051
1186
  * Cannot cancel the same proposal twice
@@ -1622,6 +1757,36 @@ declare module '@polkadot/api-base/types/errors' {
1622
1757
  **/
1623
1758
  [key: string]: AugmentedError<ApiType>;
1624
1759
  };
1760
+ metaTx: {
1761
+ /**
1762
+ * The meta transactions's birth block is ancient.
1763
+ **/
1764
+ AncientBirthBlock: AugmentedError<ApiType>;
1765
+ /**
1766
+ * Invalid proof (e.g. signature).
1767
+ **/
1768
+ BadProof: AugmentedError<ApiType>;
1769
+ /**
1770
+ * The meta transaction is not yet valid (e.g. nonce too high).
1771
+ **/
1772
+ Future: AugmentedError<ApiType>;
1773
+ /**
1774
+ * The meta transaction is invalid.
1775
+ **/
1776
+ Invalid: AugmentedError<ApiType>;
1777
+ /**
1778
+ * The meta transaction is outdated (e.g. nonce too low).
1779
+ **/
1780
+ Stale: AugmentedError<ApiType>;
1781
+ /**
1782
+ * The transaction extension did not authorize any origin.
1783
+ **/
1784
+ UnknownOrigin: AugmentedError<ApiType>;
1785
+ /**
1786
+ * Generic error
1787
+ **/
1788
+ [key: string]: AugmentedError<ApiType>;
1789
+ };
1625
1790
  multiBlockMigrations: {
1626
1791
  /**
1627
1792
  * The operation cannot complete since some MBMs are ongoing.
@@ -1654,7 +1819,7 @@ declare module '@polkadot/api-base/types/errors' {
1654
1819
  **/
1655
1820
  NoApprovalsNeeded: AugmentedError<ApiType>;
1656
1821
  /**
1657
- * Multisig operation not found when attempting to cancel.
1822
+ * Multisig operation not found in storage.
1658
1823
  **/
1659
1824
  NotFound: AugmentedError<ApiType>;
1660
1825
  /**
@@ -1662,7 +1827,8 @@ declare module '@polkadot/api-base/types/errors' {
1662
1827
  **/
1663
1828
  NoTimepoint: AugmentedError<ApiType>;
1664
1829
  /**
1665
- * Only the account that originally created the multisig is able to cancel it.
1830
+ * Only the account that originally created the multisig is able to cancel it or update
1831
+ * its deposits.
1666
1832
  **/
1667
1833
  NotOwner: AugmentedError<ApiType>;
1668
1834
  /**
@@ -2114,10 +2280,19 @@ declare module '@polkadot/api-base/types/errors' {
2114
2280
  * A (bonded) pool id does not exist.
2115
2281
  **/
2116
2282
  PoolNotFound: AugmentedError<ApiType>;
2283
+ /**
2284
+ * Account is restricted from participation in pools. This may happen if the account is
2285
+ * staking in another way already.
2286
+ **/
2287
+ Restricted: AugmentedError<ApiType>;
2117
2288
  /**
2118
2289
  * A reward pool does not exist. In all cases this is a system logic error.
2119
2290
  **/
2120
2291
  RewardPoolNotFound: AugmentedError<ApiType>;
2292
+ /**
2293
+ * The slash amount is too low to be applied.
2294
+ **/
2295
+ SlashTooLow: AugmentedError<ApiType>;
2121
2296
  /**
2122
2297
  * A sub pool does not exist.
2123
2298
  **/
@@ -2156,6 +2331,14 @@ declare module '@polkadot/api-base/types/errors' {
2156
2331
  * Callback action resulted in error
2157
2332
  **/
2158
2333
  CallbackFailed: AugmentedError<ApiType>;
2334
+ /**
2335
+ * The asset cannot be destroyed because some accounts for this asset contain freezes.
2336
+ **/
2337
+ ContainsFreezes: AugmentedError<ApiType>;
2338
+ /**
2339
+ * The asset cannot be destroyed because some accounts for this asset contain holds.
2340
+ **/
2341
+ ContainsHolds: AugmentedError<ApiType>;
2159
2342
  /**
2160
2343
  * The origin account is frozen.
2161
2344
  **/
@@ -2615,6 +2798,10 @@ declare module '@polkadot/api-base/types/errors' {
2615
2798
  * Contract trapped during execution.
2616
2799
  **/
2617
2800
  ContractTrapped: AugmentedError<ApiType>;
2801
+ /**
2802
+ * Failed to convert an EVM balance to a native balance.
2803
+ **/
2804
+ DecimalPrecisionLoss: AugmentedError<ApiType>;
2618
2805
  /**
2619
2806
  * Input passed to a contract API function failed to decode as expected type.
2620
2807
  **/
@@ -2643,6 +2830,10 @@ declare module '@polkadot/api-base/types/errors' {
2643
2830
  * Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`.
2644
2831
  **/
2645
2832
  InvalidCallFlags: AugmentedError<ApiType>;
2833
+ /**
2834
+ * The transaction used to dry-run a contract is invalid.
2835
+ **/
2836
+ InvalidGenericTransaction: AugmentedError<ApiType>;
2646
2837
  /**
2647
2838
  * Immutable data can only be set during deploys and only be read during calls.
2648
2839
  * Additionally, it is only valid to set the data once and it must not be empty.
@@ -2691,6 +2882,10 @@ declare module '@polkadot/api-base/types/errors' {
2691
2882
  * Can not add more data to transient storage.
2692
2883
  **/
2693
2884
  OutOfTransientStorage: AugmentedError<ApiType>;
2885
+ /**
2886
+ * Precompile Error
2887
+ **/
2888
+ PrecompileFailure: AugmentedError<ApiType>;
2694
2889
  /**
2695
2890
  * A contract called into the runtime which then called back into this pallet.
2696
2891
  **/
@@ -2699,6 +2894,10 @@ declare module '@polkadot/api-base/types/errors' {
2699
2894
  * A call tried to invoke a contract that is flagged as non-reentrant.
2700
2895
  **/
2701
2896
  ReentranceDenied: AugmentedError<ApiType>;
2897
+ /**
2898
+ * The refcount of a code either over or underflowed.
2899
+ **/
2900
+ RefcountOverOrUnderflow: AugmentedError<ApiType>;
2702
2901
  /**
2703
2902
  * A contract attempted to invoke a state modifying API while being in read-only mode.
2704
2903
  **/
@@ -2736,6 +2935,10 @@ declare module '@polkadot/api-base/types/errors' {
2736
2935
  * free balance in the sender's account.
2737
2936
  **/
2738
2937
  TransferFailed: AugmentedError<ApiType>;
2938
+ /**
2939
+ * Unsupported precompile address
2940
+ **/
2941
+ UnsupportedPrecompileAddress: AugmentedError<ApiType>;
2739
2942
  /**
2740
2943
  * The size defined in `T::MaxValueSize` was exceeded.
2741
2944
  **/
@@ -3037,6 +3240,10 @@ declare module '@polkadot/api-base/types/errors' {
3037
3240
  * Rewards for this era have already been claimed for this validator.
3038
3241
  **/
3039
3242
  AlreadyClaimed: AugmentedError<ApiType>;
3243
+ /**
3244
+ * The stake of this account is already migrated to `Fungible` holds.
3245
+ **/
3246
+ AlreadyMigrated: AugmentedError<ApiType>;
3040
3247
  /**
3041
3248
  * Controller is already paired.
3042
3249
  **/
@@ -3057,6 +3264,10 @@ declare module '@polkadot/api-base/types/errors' {
3057
3264
  * The user has enough bond and thus cannot be chilled forcefully by an external person.
3058
3265
  **/
3059
3266
  CannotChillOther: AugmentedError<ApiType>;
3267
+ /**
3268
+ * Stash could not be reaped as other pallet might depend on it.
3269
+ **/
3270
+ CannotReapStash: AugmentedError<ApiType>;
3060
3271
  /**
3061
3272
  * Cannot reset a ledger.
3062
3273
  **/
@@ -3135,6 +3346,11 @@ declare module '@polkadot/api-base/types/errors' {
3135
3346
  * Can not rebond without unlocking chunks.
3136
3347
  **/
3137
3348
  NoUnlockChunk: AugmentedError<ApiType>;
3349
+ /**
3350
+ * Account is restricted from participation in staking. This may happen if the account is
3351
+ * staking in another way already, such as via pool.
3352
+ **/
3353
+ Restricted: AugmentedError<ApiType>;
3138
3354
  /**
3139
3355
  * Provided reward destination is not allowed.
3140
3356
  **/