Transactions

associate-hotkey

Associate a hotkey with the signing coldkey.

View as Markdown

Records on chain that the signing coldkey owns the hotkey, without registering it on any subnet or staking anything. Useful when the pairing should be visible before the hotkey's first registration (registration and staking establish it as a side effect). The chain only associates hotkeys that are not already owned: if the hotkey already belongs to a coldkey the call succeeds but is silently a no-op — it does not error, and it does not take over the hotkey.

SignerPalletWraps
coldkeySubtensorModuleSubtensorModule.try_associate_hotkey

Parameters

ParameterTypeRequiredDescription
hotkey_ss58stringnoHotkey to record as owned by the signing coldkey.

Address parameters (--hotkey, --coldkey, --dest, ...) accept a raw ss58 address, an address-book or proxy-book name, or a local wallet/hotkey name.

CLI

Preview with --dry-run (shows fee, effects, and policy result without submitting), then submit:

btcli tx associate-hotkey --dry-run
btcli tx associate-hotkey -w my_coldkey

Python

import bittensor as sub
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = sub.AssociateHotkey()

async with sub.Client("finney") as client:
    plan = await client.plan(intent, wallet)   # fee, effects, policy — no submission
    result = await client.execute(intent, wallet)
    if not result.success:
        print(result.error.code, result.error.remediation)

Or build it by op name, as an agent would:

await client.execute_tool("associate_hotkey", {...}, wallet)