StakingHotkeys

Storage Map v159 → current

List of hotkeys a coldkey has staked to.

Explore chain
Queried by: stakerswalletsdelegatorsanalytics

The Big Picture

Instead of iterating through all possible hotkeys to find where a coldkey has staked, this provides a direct list. It's an index that makes portfolio queries efficient - get the list here, then query Stake for amounts.

Why This Matters

You delegated to several validators but can't remember which ones? This tells you exactly which hotkeys are receiving stake from your coldkey. Use it to enumerate your positions, then query Stake for each amount.

Example Scenario

Query StakingHotkeys(coldkey=your_address) returns [hotkey_A, hotkey_B, hotkey_C]. You're staking to 3 validators. Now query Stake for each to get amounts.

Common Questions

Is this per-subnet?
No, this is across all subnets. Each hotkey appears once even if staked on multiple subnets.
Does my own hotkey appear here?
Yes, if you've staked to your own hotkey, it will be in the list alongside delegated positions.

Use Cases

  • Show list of validators in a wallet's portfolio view
  • Enumerate delegation targets without scanning all Stake entries
  • Build delegation relationship graphs
  • Track diversification of staking positions

Purpose & Usage

Purpose

Track delegation relationships for a coldkey.

Common Query Patterns

  • List all hotkeys receiving stake from a coldkey
  • Check if coldkey is staking to a specific hotkey

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

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

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

On-Chain Activity

Write Frequency
●●●●●● Ultra-High >10M est. writes

>10M estimated writes

#6 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
v159
Current Version
v393