clear_identity

Call v136 → current #1

Removes identity metadata from an account and returns the deposit.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorssubnet ownersdevelopers

The Big Picture

Identity clearance is the reverse of registration. When you no longer need public metadata attached to your account, you can clear it and reclaim your deposit. This is commonly done when retiring validators, consolidating accounts, or preparing for account migration.

Why This Matters

The deposit locked in your identity is TAO you could be staking or using elsewhere. When you no longer need the identity (retiring a validator, moving to a new account), clearing it returns your TAO.

Example Scenario

You're shutting down your validator and moving to a new coldkey. Before the migration, call clear_identity to get your deposit back. The IdentityDissolved event confirms your identity is gone and deposit returned.

Common Questions

Do I get my full deposit back?
Yes, the entire reserved amount (InitialDeposit + all FieldDeposits) is returned to your free balance when you clear your identity.
What if I want to update my identity?
You don't need to clear first. Just call set_identity with the new info - it overwrites the old identity and adjusts the deposit as needed.
Can someone else clear my identity?
No, only the account that registered the identity can clear it. The signer must match the identified account.

Use Cases

  • Remove your identity when retiring a validator
  • Reclaim your deposit when no longer needing public identity
  • Clear outdated identity before setting a new one
  • Clean up accounts before decommissioning
Part of: Identity Registry

Input Parameters

#NameTypeDescription
0
identified
AccountId identified (AccountId) (hex -> SS58)

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Account has a registered identity in IdentityOf storage
  • Signer is the account that registered the identity

Effects

Events Emitted

Storage Modified

Postconditions

  • Identity is removed from IdentityOf storage
  • Reserved deposit is returned to the account's free balance

Side Effects

  • Emits IdentityDissolved event
  • Unreserves the previously held deposit

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

// Build clear_identity call
const identified = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const call = api.tx[stringCamelCase("Registry")][stringCamelCase("clear_identity")](
  identified
);

Runtime Info

View Source
Pallet Index
17
Call Index
1
First Version
v136
Current Version
v393