@dedot/chaintypes 0.266.0 → 0.267.0

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/polkadot/tx.d.ts CHANGED
@@ -68,7 +68,7 @@ import type {
68
68
  PolkadotPrimitivesV9AsyncBackingAsyncBackingParams,
69
69
  PolkadotPrimitivesV9ExecutorParams,
70
70
  PolkadotPrimitivesV9ApprovalVotingParams,
71
- PolkadotPrimitivesV9SchedulerParams,
71
+ PolkadotPrimitivesVstagingSchedulerParams,
72
72
  PolkadotPrimitivesV9InherentData,
73
73
  PolkadotParachainPrimitivesPrimitivesId,
74
74
  PolkadotParachainPrimitivesPrimitivesValidationCode,
@@ -80,7 +80,7 @@ import type {
80
80
  PolkadotPrimitivesV9SlashingDisputeProof,
81
81
  SpRuntimeMultiSigner,
82
82
  PalletBrokerCoretimeInterfaceCoreAssignment,
83
- PolkadotRuntimeParachainsAssignerCoretimePartsOf57600,
83
+ PolkadotRuntimeParachainsSchedulerAssignerCoretimePartsOf57600,
84
84
  PalletStateTrieMigrationMigrationLimits,
85
85
  PalletStateTrieMigrationMigrationTask,
86
86
  PalletStateTrieMigrationProgress,
@@ -94,11 +94,6 @@ import type {
94
94
  SpConsensusBeefyDoubleVotingProof,
95
95
  SpConsensusBeefyForkVotingProof,
96
96
  SpConsensusBeefyFutureBlockVotingProof,
97
- PalletRcMigratorMigrationStage,
98
- StagingXcmV5Response,
99
- PalletRcMigratorQueuePriority,
100
- PalletRcMigratorManagerMultisigVote,
101
- PalletRcMigratorMigrationSettings,
102
97
  } from './types.js';
103
98
 
104
99
  export type ChainSubmittableExtrinsic<
@@ -387,7 +382,10 @@ export interface ChainTx<
387
382
  >;
388
383
 
389
384
  /**
390
- * Cancel an anonymously scheduled task.
385
+ * Cancel a scheduled task (named or anonymous), by providing the block it is scheduled for
386
+ * execution in, as well as the index of the task in that block's agenda.
387
+ *
388
+ * In the case of a named task, it will remove it from the lookup table as well.
391
389
  *
392
390
  * @param {number} when
393
391
  * @param {number} index
@@ -539,6 +537,8 @@ export interface ChainTx<
539
537
  * original task's configuration, but will have a lower value for `remaining` than the
540
538
  * original `total_retries`.
541
539
  *
540
+ * This call **cannot** be used to set a retry configuration for a named task.
541
+ *
542
542
  * @param {[number, number]} task
543
543
  * @param {number} retries
544
544
  * @param {number} period
@@ -574,6 +574,8 @@ export interface ChainTx<
574
574
  * original task's configuration, but will have a lower value for `remaining` than the
575
575
  * original `total_retries`.
576
576
  *
577
+ * This is the only way to set a retry configuration for a named task.
578
+ *
577
579
  * @param {FixedBytes<32>} id
578
580
  * @param {number} retries
579
581
  * @param {number} period
@@ -2111,7 +2113,7 @@ export interface ChainTx<
2111
2113
  *
2112
2114
  * If a validator has more than [`Config::MaxExposurePageSize`] nominators backing
2113
2115
  * them, then the list of nominators is paged, with each page being capped at
2114
- * [`Config::MaxExposurePageSize`.] If a validator has more than one page of nominators,
2116
+ * [`Config::MaxExposurePageSize`]. If a validator has more than one page of nominators,
2115
2117
  * the call needs to be made for each page separately in order for all the nominators
2116
2118
  * backing a validator to receive the reward. The nominators are not sorted across pages
2117
2119
  * and so it should not be assumed the highest staker would be on the topmost page and vice
@@ -2305,14 +2307,16 @@ export interface ChainTx<
2305
2307
  session: {
2306
2308
  /**
2307
2309
  * Sets the session key(s) of the function caller to `keys`.
2310
+ *
2308
2311
  * Allows an account to set its session key prior to becoming a validator.
2309
2312
  * This doesn't take effect until the next session.
2310
2313
  *
2311
- * The dispatch origin of this function must be signed.
2312
- *
2313
- * ## Complexity
2314
- * - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is
2315
- * fixed.
2314
+ * - `origin`: The dispatch origin of this function must be signed.
2315
+ * - `keys`: The new session keys to set. These are the public keys of all sessions keys
2316
+ * setup in the runtime.
2317
+ * - `proof`: The proof that `origin` has access to the private keys of `keys`. See
2318
+ * [`impl_opaque_keys`](sp_runtime::impl_opaque_keys) for more information about the
2319
+ * proof format.
2316
2320
  *
2317
2321
  * @param {PolkadotRuntimeSessionKeys} keys
2318
2322
  * @param {BytesLike} proof
@@ -2343,10 +2347,6 @@ export interface ChainTx<
2343
2347
  * means being a controller account) or directly convertible into a validator ID (which
2344
2348
  * usually means being a stash account).
2345
2349
  *
2346
- * ## Complexity
2347
- * - `O(1)` in number of key types. Actual cost depends on the number of length of
2348
- * `T::Keys::key_ids()` which is fixed.
2349
- *
2350
2350
  **/
2351
2351
  purgeKeys: GenericTxCall<
2352
2352
  () => ChainSubmittableExtrinsic<
@@ -4372,7 +4372,9 @@ export interface ChainTx<
4372
4372
  * Register approval for a dispatch to be made from a deterministic composite account if
4373
4373
  * approved by a total of `threshold - 1` of `other_signatories`.
4374
4374
  *
4375
- * If there are enough, then dispatch the call.
4375
+ * **If the approval threshold is met (including the sender's approval), this will
4376
+ * immediately execute the call.** This is the only way to execute a multisig call -
4377
+ * `approve_as_multi` will never trigger execution.
4376
4378
  *
4377
4379
  * Payment: `DepositBase` will be reserved if this is the first approval, plus
4378
4380
  * `threshold` times `DepositFactor`. It is returned once this dispatch happens or
@@ -4388,8 +4390,9 @@ export interface ChainTx<
4388
4390
  * transaction index) of the first approval transaction.
4389
4391
  * - `call`: The call to be executed.
4390
4392
  *
4391
- * NOTE: Unless this is the final approval, you will generally want to use
4392
- * `approve_as_multi` instead, since it only requires a hash of the call.
4393
+ * NOTE: For intermediate approvals (not the final approval), you should generally use
4394
+ * `approve_as_multi` instead, since it only requires a hash of the call and is more
4395
+ * efficient.
4393
4396
  *
4394
4397
  * Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise
4395
4398
  * on success, result is `Ok` and the result from the interior call, if it was executed,
@@ -4444,6 +4447,13 @@ export interface ChainTx<
4444
4447
  * Register approval for a dispatch to be made from a deterministic composite account if
4445
4448
  * approved by a total of `threshold - 1` of `other_signatories`.
4446
4449
  *
4450
+ * **This function will NEVER execute the call, even if the approval threshold is
4451
+ * reached.** It only registers approval. To actually execute the call, `as_multi` must
4452
+ * be called with the full call data by any of the signatories.
4453
+ *
4454
+ * This function is more efficient than `as_multi` for intermediate approvals since it
4455
+ * only requires the call hash, not the full call data.
4456
+ *
4447
4457
  * Payment: `DepositBase` will be reserved if this is the first approval, plus
4448
4458
  * `threshold` times `DepositFactor`. It is returned once this dispatch happens or
4449
4459
  * is cancelled.
@@ -4458,7 +4468,8 @@ export interface ChainTx<
4458
4468
  * transaction index) of the first approval transaction.
4459
4469
  * - `call_hash`: The hash of the call to be executed.
4460
4470
  *
4461
- * NOTE: If this is the final approval, you will want to use `as_multi` instead.
4471
+ * NOTE: To execute the call after approvals are gathered, any signatory must call
4472
+ * `as_multi` with the full call data. This function cannot execute the call.
4462
4473
  *
4463
4474
  * ## Complexity
4464
4475
  * - `O(S)`.
@@ -7326,15 +7337,33 @@ export interface ChainTx<
7326
7337
  /**
7327
7338
  * Set scheduler-params.
7328
7339
  *
7329
- * @param {PolkadotPrimitivesV9SchedulerParams} new_
7340
+ * @param {PolkadotPrimitivesVstagingSchedulerParams} new_
7330
7341
  **/
7331
7342
  setSchedulerParams: GenericTxCall<
7332
- (new_: PolkadotPrimitivesV9SchedulerParams) => ChainSubmittableExtrinsic<
7343
+ (new_: PolkadotPrimitivesVstagingSchedulerParams) => ChainSubmittableExtrinsic<
7333
7344
  {
7334
7345
  pallet: 'Configuration';
7335
7346
  palletCall: {
7336
7347
  name: 'SetSchedulerParams';
7337
- params: { new: PolkadotPrimitivesV9SchedulerParams };
7348
+ params: { new: PolkadotPrimitivesVstagingSchedulerParams };
7349
+ };
7350
+ },
7351
+ ChainKnownTypes
7352
+ >
7353
+ >;
7354
+
7355
+ /**
7356
+ * Set the maximum relay parent session age.
7357
+ *
7358
+ * @param {number} new_
7359
+ **/
7360
+ setMaxRelayParentSessionAge: GenericTxCall<
7361
+ (new_: number) => ChainSubmittableExtrinsic<
7362
+ {
7363
+ pallet: 'Configuration';
7364
+ palletCall: {
7365
+ name: 'SetMaxRelayParentSessionAge';
7366
+ params: { new: number };
7338
7367
  };
7339
7368
  },
7340
7369
  ChainKnownTypes
@@ -9065,7 +9094,7 @@ export interface ChainTx<
9065
9094
  *
9066
9095
  * @param {number} core
9067
9096
  * @param {number} begin
9068
- * @param {Array<[PalletBrokerCoretimeInterfaceCoreAssignment, PolkadotRuntimeParachainsAssignerCoretimePartsOf57600]>} assignment
9097
+ * @param {Array<[PalletBrokerCoretimeInterfaceCoreAssignment, PolkadotRuntimeParachainsSchedulerAssignerCoretimePartsOf57600]>} assignment
9069
9098
  * @param {number | undefined} endHint
9070
9099
  **/
9071
9100
  assignCore: GenericTxCall<
@@ -9073,7 +9102,7 @@ export interface ChainTx<
9073
9102
  core: number,
9074
9103
  begin: number,
9075
9104
  assignment: Array<
9076
- [PalletBrokerCoretimeInterfaceCoreAssignment, PolkadotRuntimeParachainsAssignerCoretimePartsOf57600]
9105
+ [PalletBrokerCoretimeInterfaceCoreAssignment, PolkadotRuntimeParachainsSchedulerAssignerCoretimePartsOf57600]
9077
9106
  >,
9078
9107
  endHint: number | undefined,
9079
9108
  ) => ChainSubmittableExtrinsic<
@@ -9085,7 +9114,10 @@ export interface ChainTx<
9085
9114
  core: number;
9086
9115
  begin: number;
9087
9116
  assignment: Array<
9088
- [PalletBrokerCoretimeInterfaceCoreAssignment, PolkadotRuntimeParachainsAssignerCoretimePartsOf57600]
9117
+ [
9118
+ PalletBrokerCoretimeInterfaceCoreAssignment,
9119
+ PolkadotRuntimeParachainsSchedulerAssignerCoretimePartsOf57600,
9120
+ ]
9089
9121
  >;
9090
9122
  endHint: number | undefined;
9091
9123
  };
@@ -10272,353 +10304,6 @@ export interface ChainTx<
10272
10304
  >
10273
10305
  >;
10274
10306
 
10275
- /**
10276
- * Generic pallet tx call
10277
- **/
10278
- [callName: string]: GenericTxCall<TxCall<ChainKnownTypes>>;
10279
- };
10280
- /**
10281
- * Pallet `RcMigrator`'s transaction calls
10282
- **/
10283
- rcMigrator: {
10284
- /**
10285
- * Set the migration stage.
10286
- *
10287
- * This call is intended for emergency use only and is guarded by the
10288
- * [`Config::AdminOrigin`].
10289
- *
10290
- * @param {PalletRcMigratorMigrationStage} stage
10291
- **/
10292
- forceSetStage: GenericTxCall<
10293
- (stage: PalletRcMigratorMigrationStage) => ChainSubmittableExtrinsic<
10294
- {
10295
- pallet: 'RcMigrator';
10296
- palletCall: {
10297
- name: 'ForceSetStage';
10298
- params: { stage: PalletRcMigratorMigrationStage };
10299
- };
10300
- },
10301
- ChainKnownTypes
10302
- >
10303
- >;
10304
-
10305
- /**
10306
- * Schedule the migration to start at a given moment.
10307
- *
10308
- * ### Parameters:
10309
- * - `start`: The block number at which the migration will start. `DispatchTime` calculated
10310
- * at the moment of the extrinsic execution.
10311
- * - `warm_up`: Duration or timepoint that will be used to prepare for the migration. Calls
10312
- * are filtered during this period. It is intended to give enough time for UMP and DMP
10313
- * queues to empty. `DispatchTime` calculated at the moment of the transition to the
10314
- * warm-up stage.
10315
- * - `cool_off`: The block number at which the post migration cool-off period will end. The
10316
- * `DispatchTime` calculated at the moment of the transition to the cool-off stage.
10317
- * - `unsafe_ignore_staking_lock_check`: ONLY FOR TESTING. Ignore the check whether the
10318
- * scheduled time point is far enough in the future.
10319
- *
10320
- * Note: If the staking election for next era is already complete, and the next
10321
- * validator set is queued in `pallet-session`, we want to avoid starting the data
10322
- * migration at this point as it can lead to some missed validator rewards. To address
10323
- * this, we stop staking election at the start of migration and must wait atleast 1
10324
- * session (set via warm_up) before starting the data migration.
10325
- *
10326
- * Read [`MigrationStage::Scheduled`] documentation for more details.
10327
- *
10328
- * @param {FrameSupportScheduleDispatchTime} start
10329
- * @param {FrameSupportScheduleDispatchTime} warmUp
10330
- * @param {FrameSupportScheduleDispatchTime} coolOff
10331
- * @param {boolean} unsafeIgnoreStakingLockCheck
10332
- **/
10333
- scheduleMigration: GenericTxCall<
10334
- (
10335
- start: FrameSupportScheduleDispatchTime,
10336
- warmUp: FrameSupportScheduleDispatchTime,
10337
- coolOff: FrameSupportScheduleDispatchTime,
10338
- unsafeIgnoreStakingLockCheck: boolean,
10339
- ) => ChainSubmittableExtrinsic<
10340
- {
10341
- pallet: 'RcMigrator';
10342
- palletCall: {
10343
- name: 'ScheduleMigration';
10344
- params: {
10345
- start: FrameSupportScheduleDispatchTime;
10346
- warmUp: FrameSupportScheduleDispatchTime;
10347
- coolOff: FrameSupportScheduleDispatchTime;
10348
- unsafeIgnoreStakingLockCheck: boolean;
10349
- };
10350
- };
10351
- },
10352
- ChainKnownTypes
10353
- >
10354
- >;
10355
-
10356
- /**
10357
- * Start the data migration.
10358
- *
10359
- * This is typically called by the Asset Hub to indicate it's readiness to receive the
10360
- * migration data.
10361
- *
10362
- **/
10363
- startDataMigration: GenericTxCall<
10364
- () => ChainSubmittableExtrinsic<
10365
- {
10366
- pallet: 'RcMigrator';
10367
- palletCall: {
10368
- name: 'StartDataMigration';
10369
- };
10370
- },
10371
- ChainKnownTypes
10372
- >
10373
- >;
10374
-
10375
- /**
10376
- * Receive a query response from the Asset Hub for a previously sent xcm message.
10377
- *
10378
- * @param {bigint} queryId
10379
- * @param {StagingXcmV5Response} response
10380
- **/
10381
- receiveQueryResponse: GenericTxCall<
10382
- (
10383
- queryId: bigint,
10384
- response: StagingXcmV5Response,
10385
- ) => ChainSubmittableExtrinsic<
10386
- {
10387
- pallet: 'RcMigrator';
10388
- palletCall: {
10389
- name: 'ReceiveQueryResponse';
10390
- params: { queryId: bigint; response: StagingXcmV5Response };
10391
- };
10392
- },
10393
- ChainKnownTypes
10394
- >
10395
- >;
10396
-
10397
- /**
10398
- * Resend a previously sent and unconfirmed XCM message.
10399
- *
10400
- * @param {bigint} queryId
10401
- **/
10402
- resendXcm: GenericTxCall<
10403
- (queryId: bigint) => ChainSubmittableExtrinsic<
10404
- {
10405
- pallet: 'RcMigrator';
10406
- palletCall: {
10407
- name: 'ResendXcm';
10408
- params: { queryId: bigint };
10409
- };
10410
- },
10411
- ChainKnownTypes
10412
- >
10413
- >;
10414
-
10415
- /**
10416
- * Set the unprocessed message buffer size.
10417
- *
10418
- * `None` means to use the configuration value.
10419
- *
10420
- * @param {number | undefined} new_
10421
- **/
10422
- setUnprocessedMsgBuffer: GenericTxCall<
10423
- (new_: number | undefined) => ChainSubmittableExtrinsic<
10424
- {
10425
- pallet: 'RcMigrator';
10426
- palletCall: {
10427
- name: 'SetUnprocessedMsgBuffer';
10428
- params: { new: number | undefined };
10429
- };
10430
- },
10431
- ChainKnownTypes
10432
- >
10433
- >;
10434
-
10435
- /**
10436
- * Set the AH UMP queue priority configuration.
10437
- *
10438
- * Can only be called by the `AdminOrigin`.
10439
- *
10440
- * @param {PalletRcMigratorQueuePriority} new_
10441
- **/
10442
- setAhUmpQueuePriority: GenericTxCall<
10443
- (new_: PalletRcMigratorQueuePriority) => ChainSubmittableExtrinsic<
10444
- {
10445
- pallet: 'RcMigrator';
10446
- palletCall: {
10447
- name: 'SetAhUmpQueuePriority';
10448
- params: { new: PalletRcMigratorQueuePriority };
10449
- };
10450
- },
10451
- ChainKnownTypes
10452
- >
10453
- >;
10454
-
10455
- /**
10456
- * Set the manager account id.
10457
- *
10458
- * The manager has the similar to [`Config::AdminOrigin`] privileges except that it
10459
- * can not set the manager account id via `set_manager` call.
10460
- *
10461
- * @param {AccountId32Like | undefined} new_
10462
- **/
10463
- setManager: GenericTxCall<
10464
- (new_: AccountId32Like | undefined) => ChainSubmittableExtrinsic<
10465
- {
10466
- pallet: 'RcMigrator';
10467
- palletCall: {
10468
- name: 'SetManager';
10469
- params: { new: AccountId32Like | undefined };
10470
- };
10471
- },
10472
- ChainKnownTypes
10473
- >
10474
- >;
10475
-
10476
- /**
10477
- * XCM send call identical to the [`pallet_xcm::Pallet::send`] call but with the
10478
- * [Config::SendXcm] router which will be able to send messages to the Asset Hub during
10479
- * the migration.
10480
- *
10481
- * @param {XcmVersionedLocation} dest
10482
- * @param {XcmVersionedXcm} message
10483
- **/
10484
- sendXcmMessage: GenericTxCall<
10485
- (
10486
- dest: XcmVersionedLocation,
10487
- message: XcmVersionedXcm,
10488
- ) => ChainSubmittableExtrinsic<
10489
- {
10490
- pallet: 'RcMigrator';
10491
- palletCall: {
10492
- name: 'SendXcmMessage';
10493
- params: { dest: XcmVersionedLocation; message: XcmVersionedXcm };
10494
- };
10495
- },
10496
- ChainKnownTypes
10497
- >
10498
- >;
10499
-
10500
- /**
10501
- * Set the accounts to be preserved on Relay Chain during the migration.
10502
- *
10503
- * The accounts must have no consumers references.
10504
- *
10505
- * @param {Array<AccountId32Like>} accounts
10506
- **/
10507
- preserveAccounts: GenericTxCall<
10508
- (accounts: Array<AccountId32Like>) => ChainSubmittableExtrinsic<
10509
- {
10510
- pallet: 'RcMigrator';
10511
- palletCall: {
10512
- name: 'PreserveAccounts';
10513
- params: { accounts: Array<AccountId32Like> };
10514
- };
10515
- },
10516
- ChainKnownTypes
10517
- >
10518
- >;
10519
-
10520
- /**
10521
- * Set the canceller account id.
10522
- *
10523
- * The canceller can only stop scheduled migration.
10524
- *
10525
- * @param {AccountId32Like | undefined} new_
10526
- **/
10527
- setCanceller: GenericTxCall<
10528
- (new_: AccountId32Like | undefined) => ChainSubmittableExtrinsic<
10529
- {
10530
- pallet: 'RcMigrator';
10531
- palletCall: {
10532
- name: 'SetCanceller';
10533
- params: { new: AccountId32Like | undefined };
10534
- };
10535
- },
10536
- ChainKnownTypes
10537
- >
10538
- >;
10539
-
10540
- /**
10541
- * Pause the migration.
10542
- *
10543
- **/
10544
- pauseMigration: GenericTxCall<
10545
- () => ChainSubmittableExtrinsic<
10546
- {
10547
- pallet: 'RcMigrator';
10548
- palletCall: {
10549
- name: 'PauseMigration';
10550
- };
10551
- },
10552
- ChainKnownTypes
10553
- >
10554
- >;
10555
-
10556
- /**
10557
- * Cancel the migration.
10558
- *
10559
- * Migration can only be cancelled if it is in the [`MigrationStage::Scheduled`] state.
10560
- *
10561
- **/
10562
- cancelMigration: GenericTxCall<
10563
- () => ChainSubmittableExtrinsic<
10564
- {
10565
- pallet: 'RcMigrator';
10566
- palletCall: {
10567
- name: 'CancelMigration';
10568
- };
10569
- },
10570
- ChainKnownTypes
10571
- >
10572
- >;
10573
-
10574
- /**
10575
- * Vote on behalf of any of the members in `MultisigMembers`.
10576
- *
10577
- * Unsigned extrinsic, requiring the `payload` to be signed.
10578
- *
10579
- * Upon each call, a new entry is created in `ManagerMultisigs` map the `payload.call` to
10580
- * be dispatched. Once `MultisigThreshold` is reached, the entire map is deleted, and we
10581
- * move on to the next round.
10582
- *
10583
- * The round system ensures that signatures from older round cannot be reused.
10584
- *
10585
- * @param {PalletRcMigratorManagerMultisigVote} payload
10586
- * @param {SpRuntimeMultiSignature} sig
10587
- **/
10588
- voteManagerMultisig: GenericTxCall<
10589
- (
10590
- payload: PalletRcMigratorManagerMultisigVote,
10591
- sig: SpRuntimeMultiSignature,
10592
- ) => ChainSubmittableExtrinsic<
10593
- {
10594
- pallet: 'RcMigrator';
10595
- palletCall: {
10596
- name: 'VoteManagerMultisig';
10597
- params: { payload: PalletRcMigratorManagerMultisigVote; sig: SpRuntimeMultiSignature };
10598
- };
10599
- },
10600
- ChainKnownTypes
10601
- >
10602
- >;
10603
-
10604
- /**
10605
- * Set the migration settings. Can only be done by admin or manager.
10606
- *
10607
- * @param {PalletRcMigratorMigrationSettings | undefined} settings
10608
- **/
10609
- setSettings: GenericTxCall<
10610
- (settings: PalletRcMigratorMigrationSettings | undefined) => ChainSubmittableExtrinsic<
10611
- {
10612
- pallet: 'RcMigrator';
10613
- palletCall: {
10614
- name: 'SetSettings';
10615
- params: { settings: PalletRcMigratorMigrationSettings | undefined };
10616
- };
10617
- },
10618
- ChainKnownTypes
10619
- >
10620
- >;
10621
-
10622
10307
  /**
10623
10308
  * Generic pallet tx call
10624
10309
  **/