diff --git a/crypto/publicKey.ts b/crypto/publicKey.ts index c668850..a0bceca 100644 --- a/crypto/publicKey.ts +++ b/crypto/publicKey.ts @@ -51,8 +51,8 @@ export class BlahPublicKey { signedPayload: unknown, ): Promise<{ payload: P; key: BlahPublicKey }> { const signedPayloadSchema = blahSignedPayloadSchemaOf(schema); - const parsed = signedPayloadSchema.parse(signedPayload); - return await BlahPublicKey.verifyPayload(parsed as BlahSignedPayload

); + const parsed = signedPayloadSchema.parse(signedPayload) as z.infer

; + return await BlahPublicKey.verifyPayload(parsed); } async verifyPayload

(signedPayload: BlahSignedPayload

): Promise

{ diff --git a/identity/mod.ts b/identity/mod.ts index d3da0da..a721390 100644 --- a/identity/mod.ts +++ b/identity/mod.ts @@ -1,4 +1,26 @@ -export type { BlahActKeyRecord } from "./actKey.ts"; -export type { BlahIdentityFile } from "./identityFile.ts"; -export type { BlahProfile } from "./profile.ts"; +import type z from "zod"; + export * from "./identity.ts"; + +import { + type BlahProfile, + blahProfileSchema as internalBlahProfileSchema, +} from "./profile.ts"; +const blahProfileSchema: z.ZodType = internalBlahProfileSchema; +export { type BlahProfile, blahProfileSchema }; + +import { + type BlahIdentityFile, + blahIdentityFileSchema as internalBlahIdentityFileSchema, +} from "./identityFile.ts"; +const blahIdentityFileSchema: z.ZodType = + internalBlahIdentityFileSchema; +export { type BlahIdentityFile, blahIdentityFileSchema }; + +import { + type BlahActKeyRecord, + blahActKeyRecordSchema as internalBlahActKeyRecordSchema, +} from "./actKey.ts"; +const blahActKeyRecordSchema: z.ZodType = + internalBlahActKeyRecordSchema; +export { type BlahActKeyRecord, blahActKeyRecordSchema };