OwnedHotkeys

Storage Map v156 → current

List of hotkeys owned by a coldkey .

Explore chain
Queried by: walletsvalidatorsminersanalyticsdevelopers

The Big Picture

One coldkey can own many hotkeys. Each hotkey might be a different validator or miner on different subnets. OwnedHotkeys lets you enumerate all of them - essential for portfolio views and understanding the full scope of a coldkey's operations.

Why This Matters

How many validators do you run? Which hotkeys are yours? This gives you the complete list. Essential for any wallet or dashboard showing your operations.

Example Scenario

Query OwnedHotkeys(coldkey=your_address) returns [hotkey_A, hotkey_B, hotkey_C]. You own 3 hotkeys. Query each one's registrations to see which subnets you're active on.

Common Questions

Can I transfer hotkey ownership?
Hotkey ownership is typically permanent. The hotkey is bound to its creating coldkey. To 'transfer', you'd need to use coldkey swap which transfers everything.
How do I get more hotkeys?
Register new hotkeys. Each registration can use a new or existing hotkey. New hotkeys are automatically added to OwnedHotkeys.
Is there a limit?
No hard protocol limit, but practical limits exist - each hotkey requires management and registration costs.

Use Cases

  • Display all hotkeys in a wallet portfolio view
  • Enumerate validator/miner operations for a user
  • Build ownership graphs and analytics
  • Calculate total earnings across all hotkeys
  • Verify you own a hotkey before operations

Purpose & Usage

Purpose

Track hotkey ownership for a wallet - enumerate all operations this coldkey controls.

Common Query Patterns

  • List all hotkeys for a coldkey
  • Iterate owner relationships
  • Count hotkeys per coldkey

Query Keys

#NameTypeDescription
1
key1
AccountId [u8; 32]key1 (AccountId) (hex -> SS58)

Stored Value

value (Vec<AccountId>)

Default Value

0x00 (raw SCALE bytes)

Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.

Relationships

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 OwnedHotkeys storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query.SubtensorModule.OwnedHotkeys.getValue(key1);
console.log("OwnedHotkeys:", result);

On-Chain Activity

Write Frequency
●●●●○○ Medium 100K–1M est. writes

100K to 1M writes

#172 most written storage item

Write Source Calls + Hooks

Modified by both user extrinsics and runtime hooks

As of block 9,385,000

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v156
Current Version
v490