defi-kit 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/errors.ts","../src/zx.ts"],"sourcesContent":["export class NotFoundError extends Error {}\nexport class MintPaused extends Error {}\n","import { getAddress } from \"ethers/lib/utils\"\nimport { z } from \"zod\"\nimport { extendZodWithOpenApi } from \"@asteasolutions/zod-to-openapi\"\n\n// zx = \"zod extension\", providing custom zod types\n\nextendZodWithOpenApi(z)\n\nexport const zx = {\n address: () =>\n z.string().transform((val, ctx) => {\n try {\n return getAddress(val) as `0x${string}`\n } catch (e) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: \"Address checksum is invalid\",\n })\n return z.NEVER\n }\n }),\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAM,gBAAN,cAA4B,MAAM;AAAC;AACnC,IAAM,aAAN,cAAyB,MAAM;AAAC;;;ACDvC,SAAS,kBAAkB;AAC3B,SAAS,SAAS;AAClB,SAAS,4BAA4B;AAIrC,qBAAqB,CAAC;AAEf,IAAM,KAAK;AAAA,EAChB,SAAS,MACP,EAAE,OAAO,EAAE,UAAU,CAAC,KAAK,QAAQ;AACjC,QAAI;AACF,aAAO,WAAW,GAAG;AAAA,IACvB,SAAS,GAAG;AACV,UAAI,SAAS;AAAA,QACX,MAAM,EAAE,aAAa;AAAA,QACrB,SAAS;AAAA,MACX,CAAC;AACD,aAAO,EAAE;AAAA,IACX;AAAA,EACF,CAAC;AACL;","names":[]}