Skip to content

Commit 003d412

Browse files
author
debot
committed
chore: regenerate chaintypes
1 parent 1e0ec05 commit 003d412

6 files changed

Lines changed: 303 additions & 4 deletions

File tree

packages/chaintypes/src/westend-asset-hub/consts.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,6 +1427,11 @@ export interface ChainConsts extends GenericChainConsts {
14271427
* Pallet `StakingRcClient`'s constants
14281428
**/
14291429
stakingRcClient: {
1430+
/**
1431+
* Maximum length of encoded session keys.
1432+
**/
1433+
maxSessionKeysLength: number;
1434+
14301435
/**
14311436
* Generic pallet constant
14321437
**/

packages/chaintypes/src/westend-asset-hub/errors.d.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2809,6 +2809,39 @@ export interface ChainErrors extends GenericChainErrors {
28092809
**/
28102810
[error: string]: GenericPalletError;
28112811
};
2812+
/**
2813+
* Pallet `StakingRcClient`'s errors
2814+
**/
2815+
stakingRcClient: {
2816+
/**
2817+
* Failed to send XCM message to the Relay Chain.
2818+
**/
2819+
XcmSendFailed: GenericPalletError;
2820+
2821+
/**
2822+
* The origin account is not a registered validator.
2823+
*
2824+
* Only accounts that have called `validate()` can set or purge session keys. When called
2825+
* via a staking proxy, the origin is the delegating account (stash), which must be a
2826+
* registered validator.
2827+
**/
2828+
NotValidator: GenericPalletError;
2829+
2830+
/**
2831+
* The session keys could not be decoded as the expected RelayChainSessionKeys type.
2832+
**/
2833+
InvalidKeys: GenericPalletError;
2834+
2835+
/**
2836+
* Delivery fees exceeded the specified maximum.
2837+
**/
2838+
FeesExceededMax: GenericPalletError;
2839+
2840+
/**
2841+
* Generic pallet error
2842+
**/
2843+
[error: string]: GenericPalletError;
2844+
};
28122845
/**
28132846
* Pallet `MultiBlockElection`'s errors
28142847
**/

packages/chaintypes/src/westend-asset-hub/events.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3786,6 +3786,13 @@ export interface ChainEvents extends GenericChainEvents {
37863786
{ slashSession: number; offencesCount: number }
37873787
>;
37883788

3789+
/**
3790+
* Fees were charged for a user operation (set_keys or purge_keys).
3791+
*
3792+
* The fee includes both XCM delivery fee and relay chain execution cost.
3793+
**/
3794+
FeesPaid: GenericPalletEvent<'StakingRcClient', 'FeesPaid', { who: AccountId32; fees: bigint }>;
3795+
37893796
/**
37903797
* Something occurred that should never happen under normal operation.
37913798
* Logged as an event for fail-safe observability.

packages/chaintypes/src/westend-asset-hub/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ interface ChainKnownTypes extends GenericChainKnownTypes {
5454

5555
/**
5656
* @name: WestendAssetHubApi
57-
* @specVersion: 1021002
57+
* @specVersion: 1021003
5858
**/
5959
export interface WestendAssetHubApi extends GenericSubstrateApi {
6060
rpc: ChainJsonRpcApis;

packages/chaintypes/src/westend-asset-hub/tx.d.ts

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13085,6 +13085,101 @@ export interface ChainTx<
1308513085
>
1308613086
>;
1308713087

13088+
/**
13089+
* Set session keys for a validator. Keys are validated on AssetHub and forwarded to RC.
13090+
*
13091+
* **Validation on AssetHub:**
13092+
* Keys are decoded as `T::RelayChainSessionKeys` to ensure they match RC's expected
13093+
* format. This prevents malicious validators from bloating the XCM queue with garbage
13094+
* data.
13095+
*
13096+
* This, combined with the enforcement of a high minimum validator bond, makes it
13097+
* reasonable not to require a deposit.
13098+
*
13099+
* Note: Ownership proof validation requires PR #1739 which is not backported to
13100+
* stable2512. The proof parameter will be added when that PR is backported.
13101+
*
13102+
* **Fees:**
13103+
* The actual cost of this call is higher than what the weight-based fee estimate shows.
13104+
* In addition to the local transaction weight fee, the stash account is charged an XCM
13105+
* fee (delivery + RC execution cost) via `XcmExecutor::charge_fees`. The relay chain
13106+
* uses `UnpaidExecution`, so the full remote cost is charged upfront on AssetHub.
13107+
*
13108+
* When called via a staking proxy, the proxy pays the transaction weight fee,
13109+
* while the stash (delegating account) pays the XCM fee.
13110+
*
13111+
* **Max Fee Limit:**
13112+
* Users can optionally specify `max_delivery_and_remote_execution_fee` to limit the
13113+
* delivery + RC execution fee. This does not include the local transaction weight fee. If
13114+
* the fee exceeds this limit, the operation fails with `FeesExceededMax`. Pass `None` for
13115+
* unlimited (no cap).
13116+
*
13117+
* NOTE: unlike the current flow for new validators on RC (bond -> set_keys -> validate),
13118+
* users on Asset Hub MUST call bond and validate BEFORE calling set_keys. Attempting to
13119+
* set keys before declaring intent to validate will fail with NotValidator.
13120+
*
13121+
* @param {BytesLike} keys
13122+
* @param {bigint | undefined} maxDeliveryAndRemoteExecutionFee
13123+
**/
13124+
setKeys: GenericTxCall<
13125+
(
13126+
keys: BytesLike,
13127+
maxDeliveryAndRemoteExecutionFee: bigint | undefined,
13128+
) => ChainSubmittableExtrinsic<
13129+
{
13130+
pallet: 'StakingRcClient';
13131+
palletCall: {
13132+
name: 'SetKeys';
13133+
params: { keys: BytesLike; maxDeliveryAndRemoteExecutionFee: bigint | undefined };
13134+
};
13135+
},
13136+
ChainKnownTypes
13137+
>
13138+
>;
13139+
13140+
/**
13141+
* Remove session keys for a validator.
13142+
*
13143+
* This purges the keys from the Relay Chain.
13144+
*
13145+
* Unlike `set_keys`, this does not require the caller to be a registered validator.
13146+
* This is intentional: a validator who has chilled (stopped validating) should still
13147+
* be able to purge their session keys. This matches the behavior of the original
13148+
* `pallet-session::purge_keys` which allows anyone to call it.
13149+
*
13150+
* The Relay Chain will reject the call with `NoKeys` error if the account has no
13151+
* keys set.
13152+
*
13153+
* **Fees:**
13154+
* The actual cost of this call is higher than what the weight-based fee estimate shows.
13155+
* In addition to the local transaction weight fee, the caller is charged an XCM fee
13156+
* (delivery + RC execution cost) via `XcmExecutor::charge_fees`. The relay chain uses
13157+
* `UnpaidExecution`, so the full remote cost is charged upfront on AssetHub.
13158+
*
13159+
* When called via a staking proxy, the proxy pays the transaction weight fee,
13160+
* while the delegating account pays the XCM fee.
13161+
*
13162+
* **Max Fee Limit:**
13163+
* Users can optionally specify `max_delivery_and_remote_execution_fee` to limit the
13164+
* delivery + RC execution fee. This does not include the local transaction weight fee. If
13165+
* the fee exceeds this limit, the operation fails with `FeesExceededMax`. Pass `None` for
13166+
* unlimited (no cap).
13167+
*
13168+
* @param {bigint | undefined} maxDeliveryAndRemoteExecutionFee
13169+
**/
13170+
purgeKeys: GenericTxCall<
13171+
(maxDeliveryAndRemoteExecutionFee: bigint | undefined) => ChainSubmittableExtrinsic<
13172+
{
13173+
pallet: 'StakingRcClient';
13174+
palletCall: {
13175+
name: 'PurgeKeys';
13176+
params: { maxDeliveryAndRemoteExecutionFee: bigint | undefined };
13177+
};
13178+
},
13179+
ChainKnownTypes
13180+
>
13181+
>;
13182+
1308813183
/**
1308913184
* Generic pallet tx call
1309013185
**/

packages/chaintypes/src/westend-asset-hub/types.d.ts

Lines changed: 162 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4133,7 +4133,8 @@ export type AssetHubWestendRuntimeProxyType =
41334133
| 'OldSudoBalances'
41344134
| 'OldIdentityJudgement'
41354135
| 'OldAuction'
4136-
| 'OldParaRegistration';
4136+
| 'OldParaRegistration'
4137+
| 'StakingOperator';
41374138

41384139
/**
41394140
* Contains a variant per dispatchable extrinsic that this pallet has.
@@ -13234,14 +13235,140 @@ export type PalletStakingAsyncRcClientCall =
1323413235
* Called to indicate the start of a new session on the relay chain.
1323513236
**/
1323613237
| { name: 'RelaySessionReport'; params: { report: PalletStakingAsyncRcClientSessionReport } }
13237-
| { name: 'RelayNewOffencePaged'; params: { offences: Array<[number, PalletStakingAsyncRcClientOffence]> } };
13238+
| { name: 'RelayNewOffencePaged'; params: { offences: Array<[number, PalletStakingAsyncRcClientOffence]> } }
13239+
/**
13240+
* Set session keys for a validator. Keys are validated on AssetHub and forwarded to RC.
13241+
*
13242+
* **Validation on AssetHub:**
13243+
* Keys are decoded as `T::RelayChainSessionKeys` to ensure they match RC's expected
13244+
* format. This prevents malicious validators from bloating the XCM queue with garbage
13245+
* data.
13246+
*
13247+
* This, combined with the enforcement of a high minimum validator bond, makes it
13248+
* reasonable not to require a deposit.
13249+
*
13250+
* Note: Ownership proof validation requires PR #1739 which is not backported to
13251+
* stable2512. The proof parameter will be added when that PR is backported.
13252+
*
13253+
* **Fees:**
13254+
* The actual cost of this call is higher than what the weight-based fee estimate shows.
13255+
* In addition to the local transaction weight fee, the stash account is charged an XCM
13256+
* fee (delivery + RC execution cost) via `XcmExecutor::charge_fees`. The relay chain
13257+
* uses `UnpaidExecution`, so the full remote cost is charged upfront on AssetHub.
13258+
*
13259+
* When called via a staking proxy, the proxy pays the transaction weight fee,
13260+
* while the stash (delegating account) pays the XCM fee.
13261+
*
13262+
* **Max Fee Limit:**
13263+
* Users can optionally specify `max_delivery_and_remote_execution_fee` to limit the
13264+
* delivery + RC execution fee. This does not include the local transaction weight fee. If
13265+
* the fee exceeds this limit, the operation fails with `FeesExceededMax`. Pass `None` for
13266+
* unlimited (no cap).
13267+
*
13268+
* NOTE: unlike the current flow for new validators on RC (bond -> set_keys -> validate),
13269+
* users on Asset Hub MUST call bond and validate BEFORE calling set_keys. Attempting to
13270+
* set keys before declaring intent to validate will fail with NotValidator.
13271+
**/
13272+
| { name: 'SetKeys'; params: { keys: Bytes; maxDeliveryAndRemoteExecutionFee?: bigint | undefined } }
13273+
/**
13274+
* Remove session keys for a validator.
13275+
*
13276+
* This purges the keys from the Relay Chain.
13277+
*
13278+
* Unlike `set_keys`, this does not require the caller to be a registered validator.
13279+
* This is intentional: a validator who has chilled (stopped validating) should still
13280+
* be able to purge their session keys. This matches the behavior of the original
13281+
* `pallet-session::purge_keys` which allows anyone to call it.
13282+
*
13283+
* The Relay Chain will reject the call with `NoKeys` error if the account has no
13284+
* keys set.
13285+
*
13286+
* **Fees:**
13287+
* The actual cost of this call is higher than what the weight-based fee estimate shows.
13288+
* In addition to the local transaction weight fee, the caller is charged an XCM fee
13289+
* (delivery + RC execution cost) via `XcmExecutor::charge_fees`. The relay chain uses
13290+
* `UnpaidExecution`, so the full remote cost is charged upfront on AssetHub.
13291+
*
13292+
* When called via a staking proxy, the proxy pays the transaction weight fee,
13293+
* while the delegating account pays the XCM fee.
13294+
*
13295+
* **Max Fee Limit:**
13296+
* Users can optionally specify `max_delivery_and_remote_execution_fee` to limit the
13297+
* delivery + RC execution fee. This does not include the local transaction weight fee. If
13298+
* the fee exceeds this limit, the operation fails with `FeesExceededMax`. Pass `None` for
13299+
* unlimited (no cap).
13300+
**/
13301+
| { name: 'PurgeKeys'; params: { maxDeliveryAndRemoteExecutionFee?: bigint | undefined } };
1323813302

1323913303
export type PalletStakingAsyncRcClientCallLike =
1324013304
/**
1324113305
* Called to indicate the start of a new session on the relay chain.
1324213306
**/
1324313307
| { name: 'RelaySessionReport'; params: { report: PalletStakingAsyncRcClientSessionReport } }
13244-
| { name: 'RelayNewOffencePaged'; params: { offences: Array<[number, PalletStakingAsyncRcClientOffence]> } };
13308+
| { name: 'RelayNewOffencePaged'; params: { offences: Array<[number, PalletStakingAsyncRcClientOffence]> } }
13309+
/**
13310+
* Set session keys for a validator. Keys are validated on AssetHub and forwarded to RC.
13311+
*
13312+
* **Validation on AssetHub:**
13313+
* Keys are decoded as `T::RelayChainSessionKeys` to ensure they match RC's expected
13314+
* format. This prevents malicious validators from bloating the XCM queue with garbage
13315+
* data.
13316+
*
13317+
* This, combined with the enforcement of a high minimum validator bond, makes it
13318+
* reasonable not to require a deposit.
13319+
*
13320+
* Note: Ownership proof validation requires PR #1739 which is not backported to
13321+
* stable2512. The proof parameter will be added when that PR is backported.
13322+
*
13323+
* **Fees:**
13324+
* The actual cost of this call is higher than what the weight-based fee estimate shows.
13325+
* In addition to the local transaction weight fee, the stash account is charged an XCM
13326+
* fee (delivery + RC execution cost) via `XcmExecutor::charge_fees`. The relay chain
13327+
* uses `UnpaidExecution`, so the full remote cost is charged upfront on AssetHub.
13328+
*
13329+
* When called via a staking proxy, the proxy pays the transaction weight fee,
13330+
* while the stash (delegating account) pays the XCM fee.
13331+
*
13332+
* **Max Fee Limit:**
13333+
* Users can optionally specify `max_delivery_and_remote_execution_fee` to limit the
13334+
* delivery + RC execution fee. This does not include the local transaction weight fee. If
13335+
* the fee exceeds this limit, the operation fails with `FeesExceededMax`. Pass `None` for
13336+
* unlimited (no cap).
13337+
*
13338+
* NOTE: unlike the current flow for new validators on RC (bond -> set_keys -> validate),
13339+
* users on Asset Hub MUST call bond and validate BEFORE calling set_keys. Attempting to
13340+
* set keys before declaring intent to validate will fail with NotValidator.
13341+
**/
13342+
| { name: 'SetKeys'; params: { keys: BytesLike; maxDeliveryAndRemoteExecutionFee?: bigint | undefined } }
13343+
/**
13344+
* Remove session keys for a validator.
13345+
*
13346+
* This purges the keys from the Relay Chain.
13347+
*
13348+
* Unlike `set_keys`, this does not require the caller to be a registered validator.
13349+
* This is intentional: a validator who has chilled (stopped validating) should still
13350+
* be able to purge their session keys. This matches the behavior of the original
13351+
* `pallet-session::purge_keys` which allows anyone to call it.
13352+
*
13353+
* The Relay Chain will reject the call with `NoKeys` error if the account has no
13354+
* keys set.
13355+
*
13356+
* **Fees:**
13357+
* The actual cost of this call is higher than what the weight-based fee estimate shows.
13358+
* In addition to the local transaction weight fee, the caller is charged an XCM fee
13359+
* (delivery + RC execution cost) via `XcmExecutor::charge_fees`. The relay chain uses
13360+
* `UnpaidExecution`, so the full remote cost is charged upfront on AssetHub.
13361+
*
13362+
* When called via a staking proxy, the proxy pays the transaction weight fee,
13363+
* while the delegating account pays the XCM fee.
13364+
*
13365+
* **Max Fee Limit:**
13366+
* Users can optionally specify `max_delivery_and_remote_execution_fee` to limit the
13367+
* delivery + RC execution fee. This does not include the local transaction weight fee. If
13368+
* the fee exceeds this limit, the operation fails with `FeesExceededMax`. Pass `None` for
13369+
* unlimited (no cap).
13370+
**/
13371+
| { name: 'PurgeKeys'; params: { maxDeliveryAndRemoteExecutionFee?: bigint | undefined } };
1324513372

1324613373
export type PalletStakingAsyncRcClientSessionReport = {
1324713374
endIndex: number;
@@ -17809,6 +17936,12 @@ export type PalletStakingAsyncRcClientEvent =
1780917936
* A new offence was reported.
1781017937
**/
1781117938
| { name: 'OffenceReceived'; data: { slashSession: number; offencesCount: number } }
17939+
/**
17940+
* Fees were charged for a user operation (set_keys or purge_keys).
17941+
*
17942+
* The fee includes both XCM delivery fee and relay chain execution cost.
17943+
**/
17944+
| { name: 'FeesPaid'; data: { who: AccountId32; fees: bigint } }
1781217945
/**
1781317946
* Something occurred that should never happen under normal operation.
1781417947
* Logged as an event for fail-safe observability.
@@ -21256,6 +21389,31 @@ export type PalletStakingAsyncRcClientValidatorSetReport = {
2125621389
leftover: boolean;
2125721390
};
2125821391

21392+
/**
21393+
* The `Error` enum of this pallet.
21394+
**/
21395+
export type PalletStakingAsyncRcClientError =
21396+
/**
21397+
* Failed to send XCM message to the Relay Chain.
21398+
**/
21399+
| 'XcmSendFailed'
21400+
/**
21401+
* The origin account is not a registered validator.
21402+
*
21403+
* Only accounts that have called `validate()` can set or purge session keys. When called
21404+
* via a staking proxy, the origin is the delegating account (stash), which must be a
21405+
* registered validator.
21406+
**/
21407+
| 'NotValidator'
21408+
/**
21409+
* The session keys could not be decoded as the expected RelayChainSessionKeys type.
21410+
**/
21411+
| 'InvalidKeys'
21412+
/**
21413+
* Delivery fees exceeded the specified maximum.
21414+
**/
21415+
| 'FeesExceededMax';
21416+
2125921417
/**
2126021418
* Error of the pallet that can be returned in response to dispatches.
2126121419
**/
@@ -22128,6 +22286,7 @@ export type AssetHubWestendRuntimeRuntimeError =
2212822286
| { pallet: 'NominationPools'; palletError: PalletNominationPoolsError }
2212922287
| { pallet: 'VoterList'; palletError: PalletBagsListError }
2213022288
| { pallet: 'DelegatedStaking'; palletError: PalletDelegatedStakingError }
22289+
| { pallet: 'StakingRcClient'; palletError: PalletStakingAsyncRcClientError }
2213122290
| { pallet: 'MultiBlockElection'; palletError: PalletElectionProviderMultiBlockError }
2213222291
| { pallet: 'MultiBlockElectionSigned'; palletError: PalletElectionProviderMultiBlockSignedPalletError }
2213322292
| { pallet: 'ConvictionVoting'; palletError: PalletConvictionVotingError }

0 commit comments

Comments
 (0)