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

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

On-Chain Activity

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

1M to 10M writes

#148 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
v159
Current Version
v490