diff --git a/src/index.ts b/src/index.ts index 7092629..d7a82c5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,12 +2,12 @@ import { WarpPlugin, WarpPluginType } from 'warp-contracts'; import { z } from 'zod'; -declare global { - interface SmartWeave { - extensions: { - zod: typeof z; - }; - } +export type Zod = typeof z; + +export interface SmartweaveZodExtension { + extensions: { + z: Zod; + }; } export class ZodExtension implements WarpPlugin { @@ -16,6 +16,7 @@ export class ZodExtension implements WarpPlugin { } type(): WarpPluginType { + global.zod = z; return 'smartweave-extension-zod'; } }