Live video on the AT Protocol
1import { Secp256k1Keypair, bytesToMultibase } from "@atproto/crypto";
2
3const keypair = await Secp256k1Keypair.create({ exportable: true });
4const exportedKey = await keypair.export();
5const multibaseKey = bytesToMultibase(exportedKey, "base58btc");
6console.log(keypair.did());
7console.log(multibaseKey);