set_identity

Call v195 → v219, v233 → current #68

Sets on-chain identity for a hotkey .

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorsminerssubnet ownersdevelopers

The Big Picture

Hotkey addresses are 48-character hex strings. Nobody remembers those. set_identity lets you attach human-readable metadata - name, description, website, contact. This builds your brand on-chain, making it easier for delegators to find and trust you.

Why This Matters

Would you delegate to '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY' or 'Taostats'? Identity makes your hotkey recognizable, professional, and trustworthy. It's free marketing on-chain.

Example Scenario

You run 'OpenTensor Foundation' validator. Call set_identity(hotkey, name='OpenTensor', description='Official OTF validator', url='https://opentensor.ai', contact='@opentensor'). Now explorers and wallets display your brand instead of raw hex.

Common Questions

Can anyone see my identity?
Yes, it's public on-chain. Block explorers, wallets, and delegation UIs all display identity data. Don't put private info here.
Can I update identity later?
Yes, call set_identity again with new data. The old identity is replaced. Use this to keep descriptions current.

Use Cases

  • Brand your validator with name and description
  • Provide contact info for delegators and community
  • Build reputation through consistent identity
  • Help users identify legitimate vs impersonator hotkeys

From Chain Metadata

- Set prometheus information for the neuron.

Migration Notes

v219 v233 Breaking

added field github_repo (Vec<u8>)

Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.

Input Parameters

#NameTypeDescription
0
name
Vec<u8> Vec name (Vec<u8>)
1
url
Vec<u8> Vec url (Vec<u8>)
2
github_repo
Vec<u8> Vec github_repo (Vec<u8>)
3
image
Vec<u8> Vec image (Vec<u8>)
4
discord
Vec<u8> Vec discord (Vec<u8>)
5
description
Vec<u8> Vec description (Vec<u8>)
6
additional
Vec<u8> Vec additional (Vec<u8>)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Caller owns the hotkey
  • Valid identity data

Effects

Events Emitted

Storage Modified

Postconditions

  • Identity stored on-chain

Side Effects

  • Hotkey displays identity info

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);

// Build set_identity call (typed, named args)
const name = Binary.fromOpaque(new Uint8Array(0));
const url = Binary.fromOpaque(new Uint8Array(0));
const github_repo = Binary.fromOpaque(new Uint8Array(0));
const image = Binary.fromOpaque(new Uint8Array(0));
const discord = Binary.fromOpaque(new Uint8Array(0));
const description = Binary.fromOpaque(new Uint8Array(0));
const additional = Binary.fromOpaque(new Uint8Array(0));

const tx = api.tx.SubtensorModule.set_identity({
  name,
  url,
  github_repo,
  image,
  discord,
  description,
  additional,
});

Version History

v195 block 3,791,350 6 args
v233 block 4,920,350 7 args Current

Runtime Info

View Source
Pallet Index
7
Call Index
68
First Version
v195
Current Version
v411