Queries
locks-for-hotkey
Every coldkey's lock targeting a hotkey on a subnet, rolled forward to now.
The reverse of locks_for_coldkey: scans the LockingColdkeys
reverse index for the coldkeys with a non-zero lock pointed at the
hotkey, then loads each lock record. This is the target-side view — a
subnet owner can see which coldkeys are building conviction toward a
hotkey, not just the locks their own coldkey created.
Category: Locks & conviction
Parameters
| Parameter | Type | Description |
|---|---|---|
hotkey_ss58 | string | Hotkey the locks target. |
netuid | integer | Subnet to query. |
CLI
btcli query locks-for-hotkey --hotkey <ss58|name> --netuid <integer> --jsonPython
Namespace method (autocomplete, signature help):
import bittensor as bt
sub = bt.Subtensor()
result = sub.locks.locks_for_hotkey(hotkey_ss58="5F...", netuid=1)Or dispatch by name, as an agent would:
result = sub.read("locks_for_hotkey", hotkey_ss58="5F...", netuid=1)Async is the same surface awaited: async with bt.Subtensor() as client:.
On-chain implementation
- Storage
SubtensorModule.LockingColdkeys
Every file is browsable under /code exactly as built into the runtime.