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.
@@ -53,12 +53,20 @@ var zx = {
53
53
  })
54
54
  };
55
55
 
56
+ // src/types.ts
57
+ var Chain = /* @__PURE__ */ ((Chain2) => {
58
+ Chain2["eth"] = "eth";
59
+ Chain2["gno"] = "gno";
60
+ return Chain2;
61
+ })(Chain || {});
62
+
56
63
  export {
57
64
  __commonJS,
58
65
  __export,
59
66
  __toESM,
60
67
  NotFoundError,
61
68
  MintPaused,
62
- zx
69
+ zx,
70
+ Chain
63
71
  };
64
- //# sourceMappingURL=chunk-WMII4CAV.mjs.map
72
+ //# sourceMappingURL=chunk-PU3MJ7WD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/errors.ts","../src/zx.ts","../src/types.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","import { SomeZodObject } from \"zod\"\nimport { Permission } from \"zodiac-roles-sdk\"\n\nexport enum Chain {\n eth = \"eth\",\n gno = \"gno\",\n}\n\nexport type ActionFunction = (options: any) => Promise<Permission[]>\n\nexport type ProtocolActions = {\n deposit?: ActionFunction\n\n borrow?: ActionFunction\n\n stake?: ActionFunction\n\n claim?: ActionFunction\n\n swap?: ActionFunction\n\n lock?: ActionFunction\n\n delegate?: ActionFunction\n}\n\nexport type ActionName = keyof ProtocolActions\n\n// For registering protocols in the REST API we need zod schemas for the specific parameters of each action\nexport type ProtocolSchemas = { [key in ActionName]?: SomeZodObject }\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;;;AClBO,IAAK,QAAL,kBAAKA,WAAL;AACL,EAAAA,OAAA,SAAM;AACN,EAAAA,OAAA,SAAM;AAFI,SAAAA;AAAA,GAAA;","names":["Chain"]}
package/dist/eth.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ContractInput } from './schema-ZbsAhqUm.mjs';
2
- export { e as allow, a as schema } from './schema-ZbsAhqUm.mjs';
1
+ import { C as ContractInput } from './schema-oePREKH2.mjs';
2
+ export { e as allow, a as schema } from './schema-oePREKH2.mjs';
3
3
  import * as zodiac_roles_sdk__ from 'zodiac-roles-sdk/.';
4
4
  import 'zod';
5
5
 
package/dist/eth.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ContractInput } from './schema-ZbsAhqUm.js';
2
- export { e as allow, a as schema } from './schema-ZbsAhqUm.js';
1
+ import { C as ContractInput } from './schema-oePREKH2.js';
2
+ export { e as allow, a as schema } from './schema-oePREKH2.js';
3
3
  import * as zodiac_roles_sdk__ from 'zodiac-roles-sdk/.';
4
4
  import 'zod';
5
5