···2121 "description": "KEM algorithm used to generate this key"
2222 },
2323 "content": {
2424- "type": "string",
2525- "description": "Contents of the public key, encoded in base64"
2424+ "type": "bytes",
2525+ "description": "Contents of the public key"
2626 },
2727 "createdAt": {
2828 "type": "string",
···1111 */
1212 algorithm: /*#__PURE__*/ v.string<"x_wing" | (string & {})>(),
1313 /**
1414- * Contents of the public key, encoded in base64
1414+ * Contents of the public key
1515 */
1616- content: /*#__PURE__*/ v.string(),
1616+ content: /*#__PURE__*/ v.bytes(),
1717 createdAt: /*#__PURE__*/ v.datetimeString(),
1818 /**
1919 * A memorable name for this public key. Avoid using revealing names, such as "Graham's Macbook"
+10-9
packages/producer/mod.test.ts
···44import type { ProducerParams, PublicKeyOption } from "./types.ts";
55import type { Client, CredentialManager } from "@atcute/client";
66import type { Did, Handle, ResourceUri } from "@atcute/lexicons";
77+import type { AppCisternLexiconPubkey } from "@cistern/lexicon";
7889// Helper to create a mock Producer instance
910function createMockProducer(
···175176 $type: "app.cistern.lexicon.pubkey",
176177 name: "Key 1",
177178 algorithm: "x_wing",
178178- content: new Uint8Array(32).toBase64(),
179179+ content: { $bytes: new Uint8Array(32).toBase64() },
179180 createdAt: new Date().toISOString(),
180180- },
181181+ } as AppCisternLexiconPubkey.Main,
181182 },
182183 {
183184 uri: "at://did:plc:test/app.cistern.lexicon.pubkey/key2",
···185186 $type: "app.cistern.lexicon.pubkey",
186187 name: "Key 2",
187188 algorithm: "x_wing",
188188- content: new Uint8Array(32).toBase64(),
189189+ content: { $bytes: new Uint8Array(32).toBase64() },
189190 createdAt: new Date().toISOString(),
190190- },
191191+ } as AppCisternLexiconPubkey.Main,
191192 },
192193 ],
193194 cursor: undefined,
···216217 async fn() {
217218 let callCount = 0;
218219 const mockRpc = {
219219- get: (endpoint: string, params?: { params?: { cursor?: string } }) => {
220220+ get: (endpoint: string, _params?: { params?: { cursor?: string } }) => {
220221 if (endpoint === "com.atproto.repo.listRecords") {
221222 callCount++;
222223···231232 $type: "app.cistern.lexicon.pubkey",
232233 name: "Key 1",
233234 algorithm: "x_wing",
234234- content: new Uint8Array(32).toBase64(),
235235+ content: { $bytes: new Uint8Array(32).toBase64() },
235236 createdAt: new Date().toISOString(),
236236- },
237237+ } as AppCisternLexiconPubkey.Main,
237238 },
238239 ],
239240 cursor: "next-page",
···250251 $type: "app.cistern.lexicon.pubkey",
251252 name: "Key 2",
252253 algorithm: "x_wing",
253253- content: new Uint8Array(32).toBase64(),
254254+ content: { $bytes: new Uint8Array(32).toBase64() },
254255 createdAt: new Date().toISOString(),
255255- },
256256+ } as AppCisternLexiconPubkey.Main,
256257 },
257258 ],
258259 cursor: undefined,