From a7298685b0c9b0fd946fd14a5ecefe6b1398eec4 Mon Sep 17 00:00:00 2001 From: Ashutosh Kumar Date: Fri, 7 Aug 2026 02:02:18 +0000 Subject: [PATCH] feat(abstract-substrate): add ClaimRootWithHotkey method name, args, and schema Add the foundation types needed to build and validate the SubtensorModule.claimRootWithHotkey Substrate extrinsic for TAO root network reward claiming (SI-1171). What changed: - MethodNames: add ClaimRootWithHotkey: 'claimRootWithHotkey' constant - iface.ts: add ClaimRootWithHotkeyArgs interface { hotkey: string } - iface.ts: include ClaimRootWithHotkeyArgs in TxMethod.args union - txnSchema.ts: add ClaimRootWithHotkeyTransactionSchema requiring a valid hotkey address Ticket: SI-1171 Session-Id: ab70e181-1628-4e73-9662-8ef3fe0426ba Task-Id: 091af7ce-ed42-4177-9ee0-2231917f41fa --- modules/abstract-substrate/src/lib/iface.ts | 11 ++++++++++- modules/abstract-substrate/src/lib/txnSchema.ts | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/abstract-substrate/src/lib/iface.ts b/modules/abstract-substrate/src/lib/iface.ts index 5c920469c6..9f150493bd 100644 --- a/modules/abstract-substrate/src/lib/iface.ts +++ b/modules/abstract-substrate/src/lib/iface.ts @@ -83,6 +83,10 @@ export const MethodNames = { * Move stake from one hotkey to another. */ MoveStake: 'moveStake' as const, + /** + * Claim root network rewards with a hotkey. + */ + ClaimRootWithHotkey: 'claimRootWithHotkey' as const, } as const; /** @@ -207,6 +211,10 @@ export interface MoveStakeArgs extends Args { alphaAmount: string; } +export interface ClaimRootWithHotkeyArgs extends Args { + hotkey: string; +} + /** * Decoded TxMethod from a transaction hex */ @@ -224,7 +232,8 @@ export interface TxMethod { | WithdrawUnbondedArgs | BatchArgs | TransferStakeArgs - | MoveStakeArgs; + | MoveStakeArgs + | ClaimRootWithHotkeyArgs; name: MethodNamesValues; pallet: string; } diff --git a/modules/abstract-substrate/src/lib/txnSchema.ts b/modules/abstract-substrate/src/lib/txnSchema.ts index 0a20669818..2d275473fd 100644 --- a/modules/abstract-substrate/src/lib/txnSchema.ts +++ b/modules/abstract-substrate/src/lib/txnSchema.ts @@ -73,3 +73,7 @@ export const MoveStakeTransactionSchema = joi.object({ destinationNetuid: joi.string().required(), alphaAmount: joi.string().required(), }); + +export const ClaimRootWithHotkeyTransactionSchema = joi.object({ + hotkey: addressSchema.required(), +});