···11+import { fromBytes, toBytes } from "@atcute/cbor";
12import type { ComAtprotoIdentitySignPlcOperation } from "@atcute/client/lexicons";
23import { secp256k1 as k256 } from "@noble/curves/secp256k1";
33-import * as ui8 from "uint8arrays";
44import { formatDidKey, SECP256K1_JWT_ALG } from "../util/crypto.js";
55import { loginAgent, LoginCredentials } from "./util.js";
66···5252 const privateKey = options.privateKey
5353 ? options.privateKey instanceof Uint8Array
5454 ? options.privateKey
5555- : ui8.fromString(options.privateKey, "hex")
5555+ : fromBytes({ $bytes: options.privateKey })
5656 : k256.utils.randomPrivateKey();
57575858 const publicKey = k256.getPublicKey(privateKey);
···104104 });
105105106106 if (!options.privateKey && operation.verificationMethods) {
107107- const privateKeyString = ui8.toString(privateKey, "hex");
107107+ const privateKeyString = toBytes(privateKey).$bytes;
108108 console.log(
109109 "This is your labeler's signing key. It will be needed to sign any labels you create.",
110110 "You will not be able to retrieve this key again, so make sure to save it somewhere safe.",