Queries

locks-for-hotkey

Every coldkey's lock targeting a hotkey on a subnet, rolled forward to now.

View as Markdown

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

ParameterTypeDescription
hotkey_ss58stringHotkey the locks target.
netuidintegerSubnet to query.

CLI

btcli query locks-for-hotkey --hotkey <ss58|name> --netuid <integer> --json

Python

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

Every file is browsable under /code exactly as built into the runtime.