# announce-coldkey-swap (/docs/tx/announce-coldkey-swap)

Step one of the two-step coldkey migration: publishes only the BlakeTwo256
hash of `new_coldkey_ss58` — committing to the new key without revealing
it — and starts the chain's announcement delay. After the delay, run the
`swap_coldkey_announced` intent to move EVERYTHING this coldkey owns
(balance, stake, subnets) to the new key; check timing with the
`coldkey_swap_announcement` read. The first announcement charges the
key-swap cost (0.1 TAO, recycled); re-announcing after the chain's
reannouncement delay is free. While an announcement is pending, the chain
blocks every other signed extrinsic from this coldkey — only the
swap-related calls and shielded (encrypted) submission go through — so the
account is operationally locked for the full delay. Before announcing, be
certain you control the new coldkey and have its mnemonic backed up. A
pending announcement can be cancelled with
`clear_coldkey_swap_announcement`, and the legitimate holder can freeze
an unauthorized one with `dispute_coldkey_swap`.

| Signer    | Pallet          | Wraps                                   |
| --------- | --------------- | --------------------------------------- |
| `coldkey` | SubtensorModule | `SubtensorModule.announce_coldkey_swap` |

## Parameters [#parameters]

| Parameter          | Type   | Required | Description                                                                                                      |
| ------------------ | ------ | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `new_coldkey_ss58` | string | yes      | Coldkey that will take over everything this coldkey owns once the swap executes; only its hash is published now. |

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 announce-coldkey-swap \
  --new-coldkey <ss58|name> --dry-run
btcli tx announce-coldkey-swap \
  --new-coldkey <ss58|name> -w my_coldkey
```

## Python [#python]

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

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = sub.AnnounceColdkeySwap(new_coldkey_ss58="5F...")

async with sub.Client("finney") as client:
    plan = await client.plan(intent, wallet)   # fee, effects, policy — no submission
    result = await client.execute(intent, wallet)
    if not result.success:
        print(result.error.code, result.error.remediation)
```

Or build it by op name, as an agent would:

```python
await client.execute_tool("announce_coldkey_swap", {...}, wallet)
```
