@dedot/chaintypes 0.102.0 → 0.103.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.
@@ -23,7 +23,7 @@ export interface VersionedMoonbeamApi<Rv extends RpcVersion> extends GenericSubs
23
23
 
24
24
  /**
25
25
  * @name: MoonbeamApi
26
- * @specVersion: 3600
26
+ * @specVersion: 3601
27
27
  **/
28
28
  export interface MoonbeamApi {
29
29
  legacy: VersionedMoonbeamApi<RpcLegacy>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/chaintypes",
3
- "version": "0.102.0",
3
+ "version": "0.103.0",
4
4
  "description": "Types for substrate-based chains",
5
5
  "author": "Thang X. Vu <thang@dedot.dev>",
6
6
  "homepage": "https://dedot.dev",
@@ -25,7 +25,7 @@
25
25
  "directory": "dist"
26
26
  },
27
27
  "license": "Apache-2.0",
28
- "gitHead": "27fb2c2baa10743f7d7782653f59cd99f4a81bc2",
28
+ "gitHead": "8edbeed19b792b804121039718984379ae887ee7",
29
29
  "module": "./index.js",
30
30
  "types": "./index.d.ts",
31
31
  "exports": {
@@ -3169,6 +3169,51 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
3169
3169
  **/
3170
3170
  ContributionsRemaining: GenericPalletError<Rv>;
3171
3171
 
3172
+ /**
3173
+ * Passed account IDs are not matching unmigrated child and sibling accounts.
3174
+ **/
3175
+ WrongSovereignTranslation: GenericPalletError<Rv>;
3176
+
3177
+ /**
3178
+ * Account cannot be migrated since it is not a sovereign parachain account.
3179
+ **/
3180
+ NotSovereign: GenericPalletError<Rv>;
3181
+
3182
+ /**
3183
+ * Internal error, please bug report.
3184
+ **/
3185
+ InternalError: GenericPalletError<Rv>;
3186
+
3187
+ /**
3188
+ * The migrated account would get reaped in the process.
3189
+ **/
3190
+ WouldReap: GenericPalletError<Rv>;
3191
+
3192
+ /**
3193
+ * Failed to put a hold on an account.
3194
+ **/
3195
+ FailedToPutHold: GenericPalletError<Rv>;
3196
+
3197
+ /**
3198
+ * Failed to release a hold from an account.
3199
+ **/
3200
+ FailedToReleaseHold: GenericPalletError<Rv>;
3201
+
3202
+ /**
3203
+ * Failed to thaw a frozen balance.
3204
+ **/
3205
+ FailedToThaw: GenericPalletError<Rv>;
3206
+
3207
+ /**
3208
+ * Failed to set a freeze on an account.
3209
+ **/
3210
+ FailedToSetFreeze: GenericPalletError<Rv>;
3211
+
3212
+ /**
3213
+ * Failed to unreserve the full balance.
3214
+ **/
3215
+ CannotUnreserve: GenericPalletError<Rv>;
3216
+
3172
3217
  /**
3173
3218
  * Generic pallet error
3174
3219
  **/
@@ -3235,6 +3280,16 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
3235
3280
  FailedToBoundVector: GenericPalletError<Rv>;
3236
3281
  Unreachable: GenericPalletError<Rv>;
3237
3282
 
3283
+ /**
3284
+ * No misplaced hold found.
3285
+ **/
3286
+ NoMisplacedHoldFound: GenericPalletError<Rv>;
3287
+
3288
+ /**
3289
+ * No free balance to hold.
3290
+ **/
3291
+ NoFreeBalanceToHold: GenericPalletError<Rv>;
3292
+
3238
3293
  /**
3239
3294
  * Generic pallet error
3240
3295
  **/
@@ -55,6 +55,7 @@ import type {
55
55
  SpRuntimeDispatchErrorWithPostInfo,
56
56
  PolkadotRuntimeCommonImplsVersionedLocatableAsset,
57
57
  PolkadotParachainPrimitivesPrimitivesId,
58
+ AssetHubWestendRuntimeRuntimeHoldReason,
58
59
  PalletAhMigratorMigrationStage,
59
60
  PalletAhMigratorPalletEventName,
60
61
  } from './types.js';
@@ -4698,6 +4699,52 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
4698
4699
  { depositor: AccountId32; paraId: PolkadotParachainPrimitivesPrimitivesId; remaining: bigint }
4699
4700
  >;
4700
4701
 
4702
+ /**
4703
+ * A sovereign parachain account has been migrated from its child to sibling
4704
+ * representation.
4705
+ **/
4706
+ SovereignMigrated: GenericPalletEvent<
4707
+ Rv,
4708
+ 'AhOps',
4709
+ 'SovereignMigrated',
4710
+ {
4711
+ /**
4712
+ * The parachain ID that had its account migrated.
4713
+ **/
4714
+ paraId: PolkadotParachainPrimitivesPrimitivesId;
4715
+
4716
+ /**
4717
+ * The old account that was migrated out of.
4718
+ **/
4719
+ from: AccountId32;
4720
+
4721
+ /**
4722
+ * The new account that was migrated into.
4723
+ **/
4724
+ to: AccountId32;
4725
+ }
4726
+ >;
4727
+
4728
+ /**
4729
+ * An amount of fungible balance was put on hold.
4730
+ **/
4731
+ HoldPlaced: GenericPalletEvent<
4732
+ Rv,
4733
+ 'AhOps',
4734
+ 'HoldPlaced',
4735
+ { account: AccountId32; amount: bigint; reason: AssetHubWestendRuntimeRuntimeHoldReason }
4736
+ >;
4737
+
4738
+ /**
4739
+ * An amount of fungible balance was released from its hold.
4740
+ **/
4741
+ HoldReleased: GenericPalletEvent<
4742
+ Rv,
4743
+ 'AhOps',
4744
+ 'HoldReleased',
4745
+ { account: AccountId32; amount: bigint; reason: AssetHubWestendRuntimeRuntimeHoldReason }
4746
+ >;
4747
+
4701
4748
  /**
4702
4749
  * Generic pallet event
4703
4750
  **/
@@ -23,7 +23,7 @@ export interface VersionedWestendAssetHubApi<Rv extends RpcVersion> extends Gene
23
23
 
24
24
  /**
25
25
  * @name: WestendAssetHubApi
26
- * @specVersion: 1018006
26
+ * @specVersion: 1018007
27
27
  **/
28
28
  export interface WestendAssetHubApi {
29
29
  legacy: VersionedWestendAssetHubApi<RpcLegacy>;
@@ -92,6 +92,7 @@ import type {
92
92
  FrameSupportPreimagesBounded,
93
93
  PolkadotRuntimeCommonImplsVersionedLocatableAsset,
94
94
  PolkadotParachainPrimitivesPrimitivesId,
95
+ AssetHubWestendRuntimeRuntimeHoldReason,
95
96
  PalletRcMigratorAccountsAccount,
96
97
  PalletRcMigratorMultisigRcMultisig,
97
98
  PalletRcMigratorProxyRcProxy,
@@ -14573,6 +14574,63 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
14573
14574
  >
14574
14575
  >;
14575
14576
 
14577
+ /**
14578
+ * Try to migrate a parachain sovereign child account to its respective sibling.
14579
+ *
14580
+ * Takes the old and new account and migrates it only if they are as expected. An event of
14581
+ * `SovereignMigrated` will be emitted if the account was migrated successfully.
14582
+ *
14583
+ * Callable by any signed origin.
14584
+ *
14585
+ * @param {AccountId32Like} from
14586
+ * @param {AccountId32Like} to
14587
+ **/
14588
+ migrateParachainSovereignAcc: GenericTxCall<
14589
+ Rv,
14590
+ (
14591
+ from: AccountId32Like,
14592
+ to: AccountId32Like,
14593
+ ) => ChainSubmittableExtrinsic<
14594
+ Rv,
14595
+ {
14596
+ pallet: 'AhOps';
14597
+ palletCall: {
14598
+ name: 'MigrateParachainSovereignAcc';
14599
+ params: { from: AccountId32Like; to: AccountId32Like };
14600
+ };
14601
+ }
14602
+ >
14603
+ >;
14604
+
14605
+ /**
14606
+ * Force unreserve a named or unnamed reserve.
14607
+ *
14608
+ * @param {AccountId32Like} account
14609
+ * @param {bigint} amount
14610
+ * @param {AssetHubWestendRuntimeRuntimeHoldReason | undefined} reason
14611
+ **/
14612
+ forceUnreserve: GenericTxCall<
14613
+ Rv,
14614
+ (
14615
+ account: AccountId32Like,
14616
+ amount: bigint,
14617
+ reason: AssetHubWestendRuntimeRuntimeHoldReason | undefined,
14618
+ ) => ChainSubmittableExtrinsic<
14619
+ Rv,
14620
+ {
14621
+ pallet: 'AhOps';
14622
+ palletCall: {
14623
+ name: 'ForceUnreserve';
14624
+ params: {
14625
+ account: AccountId32Like;
14626
+ amount: bigint;
14627
+ reason: AssetHubWestendRuntimeRuntimeHoldReason | undefined;
14628
+ };
14629
+ };
14630
+ }
14631
+ >
14632
+ >;
14633
+
14576
14634
  /**
14577
14635
  * Generic pallet tx call
14578
14636
  **/
@@ -15031,6 +15089,34 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
15031
15089
  >
15032
15090
  >;
15033
15091
 
15092
+ /**
15093
+ * Fix hold reasons that were incorrectly assigned during migration.
15094
+ * This should only be used post-migration to repair bad hold reasons.
15095
+ *
15096
+ * Only the `ManagerOrigin` can call this function.
15097
+ *
15098
+ * @param {AccountId32Like} account
15099
+ * @param {bigint} delegationHold
15100
+ * @param {bigint} stakingHold
15101
+ **/
15102
+ fixMisplacedHold: GenericTxCall<
15103
+ Rv,
15104
+ (
15105
+ account: AccountId32Like,
15106
+ delegationHold: bigint,
15107
+ stakingHold: bigint,
15108
+ ) => ChainSubmittableExtrinsic<
15109
+ Rv,
15110
+ {
15111
+ pallet: 'AhMigrator';
15112
+ palletCall: {
15113
+ name: 'FixMisplacedHold';
15114
+ params: { account: AccountId32Like; delegationHold: bigint; stakingHold: bigint };
15115
+ };
15116
+ }
15117
+ >
15118
+ >;
15119
+
15034
15120
  /**
15035
15121
  * Generic pallet tx call
15036
15122
  **/
@@ -17278,6 +17278,22 @@ export type PalletAhOpsCall =
17278
17278
  | {
17279
17279
  name: 'UnreserveCrowdloanReserve';
17280
17280
  params: { block: number; depositor?: AccountId32 | undefined; paraId: PolkadotParachainPrimitivesPrimitivesId };
17281
+ }
17282
+ /**
17283
+ * Try to migrate a parachain sovereign child account to its respective sibling.
17284
+ *
17285
+ * Takes the old and new account and migrates it only if they are as expected. An event of
17286
+ * `SovereignMigrated` will be emitted if the account was migrated successfully.
17287
+ *
17288
+ * Callable by any signed origin.
17289
+ **/
17290
+ | { name: 'MigrateParachainSovereignAcc'; params: { from: AccountId32; to: AccountId32 } }
17291
+ /**
17292
+ * Force unreserve a named or unnamed reserve.
17293
+ **/
17294
+ | {
17295
+ name: 'ForceUnreserve';
17296
+ params: { account: AccountId32; amount: bigint; reason?: AssetHubWestendRuntimeRuntimeHoldReason | undefined };
17281
17297
  };
17282
17298
 
17283
17299
  export type PalletAhOpsCallLike =
@@ -17333,8 +17349,57 @@ export type PalletAhOpsCallLike =
17333
17349
  depositor?: AccountId32Like | undefined;
17334
17350
  paraId: PolkadotParachainPrimitivesPrimitivesId;
17335
17351
  };
17352
+ }
17353
+ /**
17354
+ * Try to migrate a parachain sovereign child account to its respective sibling.
17355
+ *
17356
+ * Takes the old and new account and migrates it only if they are as expected. An event of
17357
+ * `SovereignMigrated` will be emitted if the account was migrated successfully.
17358
+ *
17359
+ * Callable by any signed origin.
17360
+ **/
17361
+ | { name: 'MigrateParachainSovereignAcc'; params: { from: AccountId32Like; to: AccountId32Like } }
17362
+ /**
17363
+ * Force unreserve a named or unnamed reserve.
17364
+ **/
17365
+ | {
17366
+ name: 'ForceUnreserve';
17367
+ params: {
17368
+ account: AccountId32Like;
17369
+ amount: bigint;
17370
+ reason?: AssetHubWestendRuntimeRuntimeHoldReason | undefined;
17371
+ };
17336
17372
  };
17337
17373
 
17374
+ export type AssetHubWestendRuntimeRuntimeHoldReason =
17375
+ | { type: 'Preimage'; value: PalletPreimageHoldReason }
17376
+ | { type: 'PolkadotXcm'; value: PalletXcmHoldReason }
17377
+ | { type: 'NftFractionalization'; value: PalletNftFractionalizationHoldReason }
17378
+ | { type: 'Revive'; value: PalletReviveHoldReason }
17379
+ | { type: 'AssetRewards'; value: PalletAssetRewardsHoldReason }
17380
+ | { type: 'StateTrieMigration'; value: PalletStateTrieMigrationHoldReason }
17381
+ | { type: 'Staking'; value: PalletStakingAsyncPalletHoldReason }
17382
+ | { type: 'DelegatedStaking'; value: PalletDelegatedStakingHoldReason }
17383
+ | { type: 'MultiBlockSigned'; value: PalletElectionProviderMultiBlockSignedPalletHoldReason };
17384
+
17385
+ export type PalletPreimageHoldReason = 'Preimage';
17386
+
17387
+ export type PalletXcmHoldReason = 'AuthorizeAlias';
17388
+
17389
+ export type PalletNftFractionalizationHoldReason = 'Fractionalized';
17390
+
17391
+ export type PalletReviveHoldReason = 'CodeUploadDepositReserve' | 'StorageDepositReserve' | 'AddressMapping';
17392
+
17393
+ export type PalletAssetRewardsHoldReason = 'PoolCreation';
17394
+
17395
+ export type PalletStateTrieMigrationHoldReason = 'SlashForMigrate';
17396
+
17397
+ export type PalletStakingAsyncPalletHoldReason = 'Staking';
17398
+
17399
+ export type PalletDelegatedStakingHoldReason = 'StakingDelegation';
17400
+
17401
+ export type PalletElectionProviderMultiBlockSignedPalletHoldReason = 'SignedSubmission';
17402
+
17338
17403
  /**
17339
17404
  * Contains a variant per dispatchable extrinsic that this pallet has.
17340
17405
  **/
@@ -17427,7 +17492,14 @@ export type PalletAhMigratorCall =
17427
17492
  *
17428
17493
  * This is typically called by the Relay Chain to signal the migration has finished.
17429
17494
  **/
17430
- | { name: 'FinishMigration'; params: { data: PalletRcMigratorMigrationFinishedData } };
17495
+ | { name: 'FinishMigration'; params: { data: PalletRcMigratorMigrationFinishedData } }
17496
+ /**
17497
+ * Fix hold reasons that were incorrectly assigned during migration.
17498
+ * This should only be used post-migration to repair bad hold reasons.
17499
+ *
17500
+ * Only the `ManagerOrigin` can call this function.
17501
+ **/
17502
+ | { name: 'FixMisplacedHold'; params: { account: AccountId32; delegationHold: bigint; stakingHold: bigint } };
17431
17503
 
17432
17504
  export type PalletAhMigratorCallLike =
17433
17505
  /**
@@ -17518,7 +17590,14 @@ export type PalletAhMigratorCallLike =
17518
17590
  *
17519
17591
  * This is typically called by the Relay Chain to signal the migration has finished.
17520
17592
  **/
17521
- | { name: 'FinishMigration'; params: { data: PalletRcMigratorMigrationFinishedData } };
17593
+ | { name: 'FinishMigration'; params: { data: PalletRcMigratorMigrationFinishedData } }
17594
+ /**
17595
+ * Fix hold reasons that were incorrectly assigned during migration.
17596
+ * This should only be used post-migration to repair bad hold reasons.
17597
+ *
17598
+ * Only the `ManagerOrigin` can call this function.
17599
+ **/
17600
+ | { name: 'FixMisplacedHold'; params: { account: AccountId32Like; delegationHold: bigint; stakingHold: bigint } };
17522
17601
 
17523
17602
  export type PalletRcMigratorAccountsAccount = {
17524
17603
  who: AccountId32;
@@ -17538,10 +17617,6 @@ export type AssetHubWestendRuntimeAhMigrationRcHoldReason =
17538
17617
  | { type: 'DelegatedStaking'; value: PalletDelegatedStakingHoldReason }
17539
17618
  | { type: 'Staking'; value: PalletStakingPalletHoldReason };
17540
17619
 
17541
- export type PalletPreimageHoldReason = 'Preimage';
17542
-
17543
- export type PalletDelegatedStakingHoldReason = 'StakingDelegation';
17544
-
17545
17620
  export type PalletStakingPalletHoldReason = 'Staking';
17546
17621
 
17547
17622
  export type AssetHubWestendRuntimeAhMigrationRcFreezeReason = {
@@ -18034,6 +18109,43 @@ export type PalletAhOpsEvent =
18034
18109
  | {
18035
18110
  name: 'CrowdloanUnreserveRemaining';
18036
18111
  data: { depositor: AccountId32; paraId: PolkadotParachainPrimitivesPrimitivesId; remaining: bigint };
18112
+ }
18113
+ /**
18114
+ * A sovereign parachain account has been migrated from its child to sibling
18115
+ * representation.
18116
+ **/
18117
+ | {
18118
+ name: 'SovereignMigrated';
18119
+ data: {
18120
+ /**
18121
+ * The parachain ID that had its account migrated.
18122
+ **/
18123
+ paraId: PolkadotParachainPrimitivesPrimitivesId;
18124
+
18125
+ /**
18126
+ * The old account that was migrated out of.
18127
+ **/
18128
+ from: AccountId32;
18129
+
18130
+ /**
18131
+ * The new account that was migrated into.
18132
+ **/
18133
+ to: AccountId32;
18134
+ };
18135
+ }
18136
+ /**
18137
+ * An amount of fungible balance was put on hold.
18138
+ **/
18139
+ | {
18140
+ name: 'HoldPlaced';
18141
+ data: { account: AccountId32; amount: bigint; reason: AssetHubWestendRuntimeRuntimeHoldReason };
18142
+ }
18143
+ /**
18144
+ * An amount of fungible balance was released from its hold.
18145
+ **/
18146
+ | {
18147
+ name: 'HoldReleased';
18148
+ data: { account: AccountId32; amount: bigint; reason: AssetHubWestendRuntimeRuntimeHoldReason };
18037
18149
  };
18038
18150
 
18039
18151
  /**
@@ -18398,31 +18510,6 @@ export type FrameSupportTokensMiscIdAmountRuntimeHoldReason = {
18398
18510
  amount: bigint;
18399
18511
  };
18400
18512
 
18401
- export type AssetHubWestendRuntimeRuntimeHoldReason =
18402
- | { type: 'Preimage'; value: PalletPreimageHoldReason }
18403
- | { type: 'PolkadotXcm'; value: PalletXcmHoldReason }
18404
- | { type: 'NftFractionalization'; value: PalletNftFractionalizationHoldReason }
18405
- | { type: 'Revive'; value: PalletReviveHoldReason }
18406
- | { type: 'AssetRewards'; value: PalletAssetRewardsHoldReason }
18407
- | { type: 'StateTrieMigration'; value: PalletStateTrieMigrationHoldReason }
18408
- | { type: 'Staking'; value: PalletStakingAsyncPalletHoldReason }
18409
- | { type: 'DelegatedStaking'; value: PalletDelegatedStakingHoldReason }
18410
- | { type: 'MultiBlockSigned'; value: PalletElectionProviderMultiBlockSignedPalletHoldReason };
18411
-
18412
- export type PalletXcmHoldReason = 'AuthorizeAlias';
18413
-
18414
- export type PalletNftFractionalizationHoldReason = 'Fractionalized';
18415
-
18416
- export type PalletReviveHoldReason = 'CodeUploadDepositReserve' | 'StorageDepositReserve' | 'AddressMapping';
18417
-
18418
- export type PalletAssetRewardsHoldReason = 'PoolCreation';
18419
-
18420
- export type PalletStateTrieMigrationHoldReason = 'SlashForMigrate';
18421
-
18422
- export type PalletStakingAsyncPalletHoldReason = 'Staking';
18423
-
18424
- export type PalletElectionProviderMultiBlockSignedPalletHoldReason = 'SignedSubmission';
18425
-
18426
18513
  export type FrameSupportTokensMiscIdAmountRuntimeFreezeReason = {
18427
18514
  id: AssetHubWestendRuntimeRuntimeFreezeReason;
18428
18515
  amount: bigint;
@@ -20880,7 +20967,43 @@ export type PalletAhOpsError =
20880
20967
  /**
20881
20968
  * Not all contributions are withdrawn.
20882
20969
  **/
20883
- | 'ContributionsRemaining';
20970
+ | 'ContributionsRemaining'
20971
+ /**
20972
+ * Passed account IDs are not matching unmigrated child and sibling accounts.
20973
+ **/
20974
+ | 'WrongSovereignTranslation'
20975
+ /**
20976
+ * Account cannot be migrated since it is not a sovereign parachain account.
20977
+ **/
20978
+ | 'NotSovereign'
20979
+ /**
20980
+ * Internal error, please bug report.
20981
+ **/
20982
+ | 'InternalError'
20983
+ /**
20984
+ * The migrated account would get reaped in the process.
20985
+ **/
20986
+ | 'WouldReap'
20987
+ /**
20988
+ * Failed to put a hold on an account.
20989
+ **/
20990
+ | 'FailedToPutHold'
20991
+ /**
20992
+ * Failed to release a hold from an account.
20993
+ **/
20994
+ | 'FailedToReleaseHold'
20995
+ /**
20996
+ * Failed to thaw a frozen balance.
20997
+ **/
20998
+ | 'FailedToThaw'
20999
+ /**
21000
+ * Failed to set a freeze on an account.
21001
+ **/
21002
+ | 'FailedToSetFreeze'
21003
+ /**
21004
+ * Failed to unreserve the full balance.
21005
+ **/
21006
+ | 'CannotUnreserve';
20884
21007
 
20885
21008
  export type PalletAhMigratorBalancesBefore = { checkingAccount: bigint; totalIssuance: bigint };
20886
21009
 
@@ -20933,7 +21056,15 @@ export type PalletAhMigratorError =
20933
21056
  * Vector did not fit into its compile-time bound.
20934
21057
  **/
20935
21058
  | 'FailedToBoundVector'
20936
- | 'Unreachable';
21059
+ | 'Unreachable'
21060
+ /**
21061
+ * No misplaced hold found.
21062
+ **/
21063
+ | 'NoMisplacedHoldFound'
21064
+ /**
21065
+ * No free balance to hold.
21066
+ **/
21067
+ | 'NoFreeBalanceToHold';
20937
21068
 
20938
21069
  export type CumulusPalletWeightReclaimStorageWeightReclaim = [
20939
21070
  FrameSystemExtensionsAuthorizeCall,