import { useState } from "preact/hooks"; import { Link } from "../components/Link.tsx"; interface PlcUpdateStep { name: string; status: "pending" | "in-progress" | "verifying" | "completed" | "error"; error?: string; } // Content chunks for the description const contentChunks = [ { title: "Welcome to Key Management", subtitle: "BOARDING PASS - SECTION A", content: ( <>
This tool helps you add a new rotation key to your{" "} PLC (Public Ledger of Credentials) . Having control of a rotation key gives you sovereignty over your DID (Decentralized Identifier).
> ), }, { title: "Key Benefits", subtitle: "BOARDING PASS - SECTION B", content: ( <>Change your PDS without losing your identity, protecting you if your provider becomes hostile.
Modify your DID document independently of your provider.
💡 It's good practice to have a rotation key so you can move to a different provider if you need to.
This rotation key CANNOT BE DISABLED OR DELETED once added:
💡 We recommend adding a custom rotation key but recommend{" "} against{" "} having more than one custom rotation key, as more than one increases risk.
The rotation key is a did:key that will be added to your PLC document's rotationKeys array. This process uses the AT Protocol's PLC operations to update your DID document. Learn more about did:plc
{getStepDisplayName(step, index)}
{/* Add step number */} Step {index + 1} of {steps.length}{(() => { try { const err = JSON.parse(step.error); return err.message || step.error; } catch { return step.error; } })()}
Your rotation key grants control over your identity:
Check your email for the verification code to complete the PLC update:
{step.error}
{step.error .toLowerCase() .includes("token is invalid") && (The verification code may have expired. Request a new code to try again.
Your rotation key has been successfully added to your PLC record. You can now use this key for future DID modifications.