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 key1 (AccountId) (hex -> SS58)

Stored Value

value (Vec<AccountId>)

Relationships

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query OwnedHotkeys storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("OwnedHotkeys")](
  key1
);

console.log("OwnedHotkeys:", result.toHuman());

On-Chain Activity

Write Frequency
●●●●●○ High 1M–10M est. writes

1M–10M estimated writes

#13 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 7,429,232

Runtime Info

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