# set-identity (/docs/tx/set-identity)

Stores public, human-readable metadata against the signing coldkey so
explorers, wallets, and delegators can recognize it — useful for validator
operators and subnet owners who want a public face. The signing coldkey
must own at least one hotkey registered on some subnet, else the call
fails with `HotKeyNotRegisteredInNetwork`. Everything submitted is
public and permanent history on chain, so include nothing sensitive.
Calling again overwrites the whole identity (empty fields clear their
previous values); the chain enforces length limits on each field. Purely
cosmetic: no effect on balances, stake, or permissions.

| Signer    | Origin                                 | Pallet          | Wraps                                                                                          |
| --------- | -------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------- |
| `coldkey` | signed account (pallet role may apply) | SubtensorModule | [`SubtensorModule.set_identity`](/code/pallets/subtensor/src/macros/dispatches.rs#L1118-L1140) |

## Parameters [#parameters]

| Parameter     | Type   | Required | Description                                             |
| ------------- | ------ | -------- | ------------------------------------------------------- |
| `name`        | string | yes      | Display name shown for this coldkey.                    |
| `url`         | string | no       | Website associated with this identity.                  |
| `github_repo` | string | no       | GitHub repository URL.                                  |
| `image`       | string | no       | Avatar or logo image URL.                               |
| `discord`     | string | no       | Discord handle or server invite.                        |
| `description` | string | no       | Short free-text description of who this key belongs to. |
| `additional`  | string | no       | Any extra free-text information to publish.             |

Address parameters (`--hotkey`, `--coldkey`, `--dest`, ...) accept a raw ss58
address, an address-book or proxy-book name, or a local wallet/hotkey name.

## CLI [#cli]

Preview with `--dry-run` (shows fee, effects, and policy result without
submitting), then submit:

```bash
btcli tx set-identity \
  --name <value> --dry-run
btcli tx set-identity \
  --name <value> -w my_coldkey
```

## Python [#python]

```python
import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.SetIdentity(name="...")

sub = bt.Subtensor()
plan = sub.plan(intent, wallet)   # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
    print(result.error.code, result.error.remediation)
```

(`bt.Subtensor` is also the async client — `async with bt.Subtensor() as client:`
— see [The client](/docs/concepts/client).) Or build the intent by op name, as
an agent would:

```python
result = sub.execute_tool("set_identity", {...}, wallet)
```

## On-chain implementation [#on-chain-implementation]

`SubtensorModule.set_identity` — [`pallets/subtensor/src/macros/dispatches.rs#L1120`](/code/pallets/subtensor/src/macros/dispatches.rs#L1118-L1140):

```rust
#[pallet::call_index(68)]
#[pallet::weight(<T as crate::pallet::Config>::WeightInfo::set_identity())]
pub fn set_identity(
    origin: OriginFor<T>,
    name: Vec<u8>,
    url: Vec<u8>,
    github_repo: Vec<u8>,
    image: Vec<u8>,
    discord: Vec<u8>,
    description: Vec<u8>,
    additional: Vec<u8>,
) -> DispatchResult {
    Self::do_set_identity(
        origin,
        name,
        url,
        github_repo,
        image,
        discord,
        description,
        additional,
    )
}
```

Delegates to [`do_set_identity`](/code/pallets/subtensor/src/utils/identity.rs#L27).

Every file is browsable under [/code](/code) exactly as built into the runtime, or as plain text under `/code/raw/<path>` (index: [`/code/index.json`](/code/index.json)).
