The Big Picture
Hotkeys are the 'working' keys that interact with subnets. But they're controlled by coldkeys, which are kept secure (often offline). This mapping tells you which coldkey controls which hotkey - essential for understanding who actually controls a validator or miner.
Why This Matters
You see a hotkey earning big emissions. Who actually controls it? This reveals the coldkey behind any hotkey - the real owner who can withdraw earnings and control the operation.
Example Scenario
Query Owner(hotkey=5HotKeyAddress...) returns 5ColdKeyAddress.... The coldkey 5ColdKey... is the owner and can perform privileged operations like unstaking.
Common Questions
- Can ownership change?
- Hotkey ownership is typically permanent. The hotkey is linked to its coldkey at creation and cannot be transferred.
- What's the reverse lookup?
- Use OwnedHotkeys(coldkey) to get all hotkeys owned by a coldkey. Owner is hotkey→coldkey, OwnedHotkeys is coldkey→[hotkeys].
Use Cases
- Verify you own a hotkey before performing operations
- Look up who controls a validator hotkey
- Build hotkey-to-coldkey relationship graphs
- Trace ownership for security and compliance analysis
Purpose & Usage
Purpose
Track ownership of hotkeys.
Common Query Patterns
- Query owner for a hotkey
- Verify ownership before operations
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | hotkey hotkey raw: key1 | [u8; 32] [32] | key1 ([u8; 32]) |
Stored Value
value (AccountId)
Decoding the value
AccountId (32-byte coldkey)Returns the SS58 (prefix 42) coldkey owning this hotkey. Default value when no entry is the zero address.
value as `0x${string}` // 32-byte AccountIdRelationships
Code Examples
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Query Owner storage
const key1 = "0x0000000000000000000000000000000000000000000000000000000000000000";
const result = await api.query.SubtensorModule.Owner.getValue(key1);
console.log("Owner:", result);On-Chain Activity
<10K estimated writes
#55 most written storage item
Modified via user-submitted extrinsics
As of block 7,429,232
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v101
- Current Version
- v411