@evergonlabs/tmi-protocol-types 0.1.0
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.
- package/dist/chunk-2KI5OZLW.js +2 -0
- package/dist/chunk-2KI5OZLW.js.map +1 -0
- package/dist/chunk-2RUMPEU7.js +1 -0
- package/dist/chunk-2RUMPEU7.js.map +1 -0
- package/dist/chunk-3O2X45IG.js +2 -0
- package/dist/chunk-3O2X45IG.js.map +1 -0
- package/dist/chunk-BQLDMR6G.js +1 -0
- package/dist/chunk-BQLDMR6G.js.map +1 -0
- package/dist/chunk-CA4TYRQC.js +2 -0
- package/dist/chunk-CA4TYRQC.js.map +1 -0
- package/dist/chunk-CBCVHVAN.js +2 -0
- package/dist/chunk-CBCVHVAN.js.map +1 -0
- package/dist/chunk-FVATIYMU.js +1 -0
- package/dist/chunk-FVATIYMU.js.map +1 -0
- package/dist/chunk-I3RLTPB7.js +2 -0
- package/dist/chunk-I3RLTPB7.js.map +1 -0
- package/dist/chunk-MKYIMH4C.js +2 -0
- package/dist/chunk-MKYIMH4C.js.map +1 -0
- package/dist/chunk-O4ICSAOU.js +2 -0
- package/dist/chunk-O4ICSAOU.js.map +1 -0
- package/dist/chunk-REPE7APZ.js +2 -0
- package/dist/chunk-REPE7APZ.js.map +1 -0
- package/dist/chunk-VTUC735Y.js +2 -0
- package/dist/chunk-VTUC735Y.js.map +1 -0
- package/dist/chunk-WKDYHFTD.js +2 -0
- package/dist/chunk-WKDYHFTD.js.map +1 -0
- package/dist/chunk-YWLL3DQU.js +2 -0
- package/dist/chunk-YWLL3DQU.js.map +1 -0
- package/dist/chunk-Z4EJV7T7.js +2 -0
- package/dist/chunk-Z4EJV7T7.js.map +1 -0
- package/dist/common/error-like.cjs +2 -0
- package/dist/common/error-like.cjs.map +1 -0
- package/dist/common/error-like.d.cts +15 -0
- package/dist/common/error-like.d.ts +15 -0
- package/dist/common/error-like.js +2 -0
- package/dist/common/error-like.js.map +1 -0
- package/dist/common/index.cjs +2 -0
- package/dist/common/index.cjs.map +1 -0
- package/dist/common/index.d.cts +7 -0
- package/dist/common/index.d.ts +7 -0
- package/dist/common/index.js +2 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/numberish/numberish.cjs +2 -0
- package/dist/common/numberish/numberish.cjs.map +1 -0
- package/dist/common/numberish/numberish.d.cts +8 -0
- package/dist/common/numberish/numberish.d.ts +8 -0
- package/dist/common/numberish/numberish.js +2 -0
- package/dist/common/numberish/numberish.js.map +1 -0
- package/dist/common/numberish/numberish.test.cjs +15 -0
- package/dist/common/numberish/numberish.test.cjs.map +1 -0
- package/dist/common/numberish/numberish.test.d.cts +2 -0
- package/dist/common/numberish/numberish.test.d.ts +2 -0
- package/dist/common/numberish/numberish.test.js +15 -0
- package/dist/common/numberish/numberish.test.js.map +1 -0
- package/dist/common/object-keys.cjs +2 -0
- package/dist/common/object-keys.cjs.map +1 -0
- package/dist/common/object-keys.d.cts +4 -0
- package/dist/common/object-keys.d.ts +4 -0
- package/dist/common/object-keys.js +2 -0
- package/dist/common/object-keys.js.map +1 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.cjs +2 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.cjs.map +1 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.d.cts +4 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.d.ts +4 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.js +2 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.js.map +1 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.test.cjs +2 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.test.cjs.map +1 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.test.d.cts +2 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.test.d.ts +2 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.test.js +2 -0
- package/dist/common/stringIntToNumber/stringIntToNumber.test.js.map +1 -0
- package/dist/common/uri/https.cjs +2 -0
- package/dist/common/uri/https.cjs.map +1 -0
- package/dist/common/uri/https.d.cts +5 -0
- package/dist/common/uri/https.d.ts +5 -0
- package/dist/common/uri/https.js +2 -0
- package/dist/common/uri/https.js.map +1 -0
- package/dist/common/uri/index.cjs +2 -0
- package/dist/common/uri/index.cjs.map +1 -0
- package/dist/common/uri/index.d.cts +3 -0
- package/dist/common/uri/index.d.ts +3 -0
- package/dist/common/uri/index.js +2 -0
- package/dist/common/uri/index.js.map +1 -0
- package/dist/common/uri/ipfs.cjs +2 -0
- package/dist/common/uri/ipfs.cjs.map +1 -0
- package/dist/common/uri/ipfs.d.cts +5 -0
- package/dist/common/uri/ipfs.d.ts +5 -0
- package/dist/common/uri/ipfs.js +2 -0
- package/dist/common/uri/ipfs.js.map +1 -0
- package/dist/evm/address.cjs +2 -0
- package/dist/evm/address.cjs.map +1 -0
- package/dist/evm/address.d.cts +5 -0
- package/dist/evm/address.d.ts +5 -0
- package/dist/evm/address.js +2 -0
- package/dist/evm/address.js.map +1 -0
- package/dist/evm/erc1155.cjs +2 -0
- package/dist/evm/erc1155.cjs.map +1 -0
- package/dist/evm/erc1155.d.cts +27 -0
- package/dist/evm/erc1155.d.ts +27 -0
- package/dist/evm/erc1155.js +2 -0
- package/dist/evm/erc1155.js.map +1 -0
- package/dist/evm/erc20.cjs +2 -0
- package/dist/evm/erc20.cjs.map +1 -0
- package/dist/evm/erc20.d.cts +21 -0
- package/dist/evm/erc20.d.ts +21 -0
- package/dist/evm/erc20.js +2 -0
- package/dist/evm/erc20.js.map +1 -0
- package/dist/evm/erc721.cjs +2 -0
- package/dist/evm/erc721.cjs.map +1 -0
- package/dist/evm/erc721.d.cts +27 -0
- package/dist/evm/erc721.d.ts +27 -0
- package/dist/evm/erc721.js +2 -0
- package/dist/evm/erc721.js.map +1 -0
- package/dist/evm/hex.cjs +2 -0
- package/dist/evm/hex.cjs.map +1 -0
- package/dist/evm/hex.d.cts +5 -0
- package/dist/evm/hex.d.ts +5 -0
- package/dist/evm/hex.js +2 -0
- package/dist/evm/hex.js.map +1 -0
- package/dist/evm/index.cjs +2 -0
- package/dist/evm/index.cjs.map +1 -0
- package/dist/evm/index.d.cts +10 -0
- package/dist/evm/index.d.ts +10 -0
- package/dist/evm/index.js +2 -0
- package/dist/evm/index.js.map +1 -0
- package/dist/evm/sender.cjs +2 -0
- package/dist/evm/sender.cjs.map +1 -0
- package/dist/evm/sender.d.cts +8 -0
- package/dist/evm/sender.d.ts +8 -0
- package/dist/evm/sender.js +2 -0
- package/dist/evm/sender.js.map +1 -0
- package/dist/evm/token.cjs +2 -0
- package/dist/evm/token.cjs.map +1 -0
- package/dist/evm/token.d.cts +366 -0
- package/dist/evm/token.d.ts +366 -0
- package/dist/evm/token.js +2 -0
- package/dist/evm/token.js.map +1 -0
- package/dist/evm/transaction.cjs +2 -0
- package/dist/evm/transaction.cjs.map +1 -0
- package/dist/evm/transaction.d.cts +10 -0
- package/dist/evm/transaction.d.ts +10 -0
- package/dist/evm/transaction.js +2 -0
- package/dist/evm/transaction.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/uri/ipfs.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const IpfsUrlSchema = z.string().regex(/^ipfs:\\/\\/\\S+$/, {\n message: \"Must start with ipfs://\",\n});\n"],"mappings":"AAAA,OAAS,KAAAA,MAAS,MAEX,IAAMC,EAAgBD,EAAE,OAAO,EAAE,MAAM,iBAAkB,CAC9D,QAAS,yBACX,CAAC","names":["z","IpfsUrlSchema"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-2RUMPEU7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/stringIntToNumber/stringIntToNumber.ts"],"sourcesContent":["export type StringIntToNumber<T> = T extends `${infer N extends number}` ? N : never;\n\nexport function stringIntToNumber<T extends string>(x: T): StringIntToNumber<T> {\n return parseInt(x) as StringIntToNumber<T>;\n}\n"],"mappings":"AAEO,SAASA,EAAoCC,EAA4B,CAC9E,OAAO,SAASA,CAAC,CACnB","names":["stringIntToNumber","x"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-BQLDMR6G.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/uri/https.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const HttpsUrlSchema = z\n .string()\n .url()\n .refine((val) => val.startsWith(\"https://\"), {\n message: \"URL must start with https://\",\n });\n"],"mappings":"AAAA,OAAS,KAAAA,MAAS,MAEX,IAAMC,EAAiBD,EAC3B,OAAO,EACP,IAAI,EACJ,OAAQE,GAAQA,EAAI,WAAW,UAAU,EAAG,CAC3C,QAAS,8BACX,CAAC","names":["z","HttpsUrlSchema","val"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/evm/address.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { Address, isAddress } from \"viem\";\n\nexport const AddressSchema = z.custom<Address>(isAddress, { message: \"Not a valid address string\" });\n"],"mappings":"AAAA,OAAS,KAAAA,MAAS,MAClB,OAAkB,aAAAC,MAAiB,OAE5B,IAAMC,EAAgBF,EAAE,OAAgBC,EAAW,CAAE,QAAS,4BAA6B,CAAC","names":["z","isAddress","AddressSchema"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-FVATIYMU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/evm/hex.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { Hex, isHex } from \"viem\";\n\nexport const HexStringSchema = z.custom<Hex>(isHex, { message: \"Not a valid Hexademical string\" });\n"],"mappings":"AAAA,OAAS,KAAAA,MAAS,MAClB,OAAc,SAAAC,MAAa,OAEpB,IAAMC,EAAkBF,EAAE,OAAYC,EAAO,CAAE,QAAS,gCAAiC,CAAC","names":["z","isHex","HexStringSchema"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-CA4TYRQC.js";import{a as m}from"./chunk-2KI5OZLW.js";import{a as o}from"./chunk-VTUC735Y.js";import{a as e}from"./chunk-CBCVHVAN.js";import{z as r}from"zod";var n=r.object({contract:e,tokenId:o.pipe(r.bigint())}),f=r.object({baseUri:r.union([m,t]),name:r.string(),symbol:r.string()});export{n as a,f as b};
|
|
2
|
+
//# sourceMappingURL=chunk-MKYIMH4C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/evm/erc721.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { AddressSchema } from \"./address.js\";\nimport { NumberishSchema } from \"../common/numberish/numberish.js\";\nimport { IpfsUrlSchema } from \"../common/uri/ipfs.js\";\nimport { HttpsUrlSchema } from \"../common/uri/https.js\";\n\nexport const Erc721RefSchema = z.object({\n contract: AddressSchema,\n tokenId: NumberishSchema.pipe(z.bigint()),\n});\n\nexport const Erc721MetaSchema = z.object({\n baseUri: z.union([IpfsUrlSchema, HttpsUrlSchema]),\n name: z.string(),\n symbol: z.string(),\n});\n"],"mappings":"gKAAA,OAAS,KAAAA,MAAS,MAMX,IAAMC,EAAkBC,EAAE,OAAO,CACtC,SAAUC,EACV,QAASC,EAAgB,KAAKF,EAAE,OAAO,CAAC,CAC1C,CAAC,EAEYG,EAAmBH,EAAE,OAAO,CACvC,QAASA,EAAE,MAAM,CAACI,EAAeC,CAAc,CAAC,EAChD,KAAML,EAAE,OAAO,EACf,OAAQA,EAAE,OAAO,CACnB,CAAC","names":["z","Erc721RefSchema","z","AddressSchema","NumberishSchema","Erc721MetaSchema","IpfsUrlSchema","HttpsUrlSchema"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-CA4TYRQC.js";import{a as m}from"./chunk-2KI5OZLW.js";import{a as o}from"./chunk-VTUC735Y.js";import{a as e}from"./chunk-CBCVHVAN.js";import{z as r}from"zod";var n=r.object({contract:e,tokenId:o.pipe(r.bigint())}),f=r.object({baseUri:r.union([m,t]),name:r.string(),symbol:r.string()});export{n as a,f as b};
|
|
2
|
+
//# sourceMappingURL=chunk-O4ICSAOU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/evm/erc1155.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { AddressSchema } from \"./address.js\";\nimport { NumberishSchema } from \"../common/numberish/numberish.js\";\nimport { IpfsUrlSchema } from \"../common/uri/ipfs.js\";\nimport { HttpsUrlSchema } from \"../common/uri/https.js\";\n\nexport const Erc1155RefSchema = z.object({\n contract: AddressSchema,\n tokenId: NumberishSchema.pipe(z.bigint()),\n});\n\nexport const Erc1155MetaSchema = z.object({\n baseUri: z.union([IpfsUrlSchema, HttpsUrlSchema]),\n name: z.string(),\n symbol: z.string(),\n});\n"],"mappings":"gKAAA,OAAS,KAAAA,MAAS,MAMX,IAAMC,EAAmBC,EAAE,OAAO,CACvC,SAAUC,EACV,QAASC,EAAgB,KAAKF,EAAE,OAAO,CAAC,CAC1C,CAAC,EAEYG,EAAoBH,EAAE,OAAO,CACxC,QAASA,EAAE,MAAM,CAACI,EAAeC,CAAc,CAAC,EAChD,KAAML,EAAE,OAAO,EACf,OAAQA,EAAE,OAAO,CACnB,CAAC","names":["z","Erc1155RefSchema","z","AddressSchema","NumberishSchema","Erc1155MetaSchema","IpfsUrlSchema","HttpsUrlSchema"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/object-keys.ts"],"sourcesContent":["export type ObjectKeys<T> = T extends object\n ? (keyof T)[]\n : T extends number\n ? []\n : T extends Array<any> | string\n ? string[]\n : never;\n\nexport function objectKeys<T extends object>(obj: T): ObjectKeys<T> {\n return Object.keys(obj) as ObjectKeys<T>;\n}\n"],"mappings":"AAQO,SAASA,EAA6BC,EAAuB,CAClE,OAAO,OAAO,KAAKA,CAAG,CACxB","names":["objectKeys","obj"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/numberish/numberish.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const NumberishSchema = z.union([z.string(), z.number(), z.bigint()]);\n\nexport type INumberish = z.input<typeof NumberishSchema>;\n\nexport const NumberishJsonSchema = z.union([z.string(), z.number()]);\n\nexport type INumberishJson = z.input<typeof NumberishSchema>;\n"],"mappings":"AAAA,OAAS,KAAAA,MAAS,MAEX,IAAMC,EAAkBD,EAAE,MAAM,CAACA,EAAE,OAAO,EAAGA,EAAE,OAAO,EAAGA,EAAE,OAAO,CAAC,CAAC,EAI9DE,EAAsBF,EAAE,MAAM,CAACA,EAAE,OAAO,EAAGA,EAAE,OAAO,CAAC,CAAC","names":["z","NumberishSchema","NumberishJsonSchema"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as n,b as r}from"./chunk-O4ICSAOU.js";import{a as c,b as T}from"./chunk-Z4EJV7T7.js";import{a,b as E}from"./chunk-MKYIMH4C.js";import{z as o}from"zod";var m=(t=>(t.ERC1155="ERC_1155",t.ERC721="ERC_721",t.ERC20="ERC_20",t))(m||{}),p={ERC_1155:n,ERC_721:a,ERC_20:c};function u(e){return o.object({type:o.literal(e),data:p[e]})}var R={ERC_1155:r,ERC_721:E,ERC_20:T};function C(e){return o.object({type:o.literal(e),data:R[e]})}export{m as a,u as b,C as c};
|
|
2
|
+
//# sourceMappingURL=chunk-WKDYHFTD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/evm/token.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { Erc1155MetaSchema, Erc1155RefSchema } from \"./erc1155.js\";\nimport { Erc721MetaSchema, Erc721RefSchema } from \"./erc721.js\";\nimport { Erc20MetaSchema, Erc20RefSchema } from \"./erc20.js\";\n\nexport enum TokenTypeEnum {\n ERC1155 = \"ERC_1155\",\n ERC721 = \"ERC_721\",\n ERC20 = \"ERC_20\",\n}\n\nconst tokenRefDictionary = {\n [TokenTypeEnum.ERC1155]: Erc1155RefSchema,\n [TokenTypeEnum.ERC721]: Erc721RefSchema,\n [TokenTypeEnum.ERC20]: Erc20RefSchema,\n} as const satisfies Record<TokenTypeEnum, z.ZodType>;\n\nexport function TokenRefSchema<TType extends TokenTypeEnum>(type: TType) {\n return z.object({\n type: z.literal(type),\n data: tokenRefDictionary[type],\n });\n}\n\nconst tokenMetaDictionary = {\n [TokenTypeEnum.ERC1155]: Erc1155MetaSchema,\n [TokenTypeEnum.ERC721]: Erc721MetaSchema,\n [TokenTypeEnum.ERC20]: Erc20MetaSchema,\n} as const satisfies Record<TokenTypeEnum, z.ZodType>;\n\nexport function TokenMetaSchema<TType extends TokenTypeEnum>(type: TType) {\n return z.object({\n type: z.literal(type),\n data: tokenMetaDictionary[type],\n });\n}\n"],"mappings":"wIAAA,OAAS,KAAAA,MAAS,MAKX,IAAKC,OACVA,EAAA,QAAU,WACVA,EAAA,OAAS,UACTA,EAAA,MAAQ,SAHEA,OAAA,IAMNC,EAAqB,CACxB,SAAwBC,EACxB,QAAuBC,EACvB,OAAsBC,CACzB,EAEO,SAASC,EAA4CC,EAAa,CACvE,OAAOC,EAAE,OAAO,CACd,KAAMA,EAAE,QAAQD,CAAI,EACpB,KAAML,EAAmBK,CAAI,CAC/B,CAAC,CACH,CAEA,IAAME,EAAsB,CACzB,SAAwBC,EACxB,QAAuBC,EACvB,OAAsBC,CACzB,EAEO,SAASC,EAA6CN,EAAa,CACxE,OAAOC,EAAE,OAAO,CACd,KAAMA,EAAE,QAAQD,CAAI,EACpB,KAAME,EAAoBF,CAAI,CAChC,CAAC,CACH","names":["z","TokenTypeEnum","tokenRefDictionary","Erc1155RefSchema","Erc721RefSchema","Erc20RefSchema","TokenRefSchema","type","z","tokenMetaDictionary","Erc1155MetaSchema","Erc721MetaSchema","Erc20MetaSchema","TokenMetaSchema"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/error-like.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const ErrorLikeSchema = z.object({\n name: z.string(),\n message: z.string(),\n});\n\nexport type IErrorLike = z.infer<typeof ErrorLikeSchema>;\n"],"mappings":"AAAA,OAAS,KAAAA,MAAS,MAEX,IAAMC,EAAkBD,EAAE,OAAO,CACtC,KAAMA,EAAE,OAAO,EACf,QAASA,EAAE,OAAO,CACpB,CAAC","names":["z","ErrorLikeSchema"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/evm/erc20.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { AddressSchema } from \"./address.js\";\n\nexport const Erc20RefSchema = z.object({\n contract: AddressSchema,\n});\n\nexport const Erc20MetaSchema = z.object({\n name: z.string(),\n symbol: z.string(),\n});\n"],"mappings":"wCAAA,OAAS,KAAAA,MAAS,MAGX,IAAMC,EAAiBC,EAAE,OAAO,CACrC,SAAUC,CACZ,CAAC,EAEYC,EAAkBF,EAAE,OAAO,CACtC,KAAMA,EAAE,OAAO,EACf,OAAQA,EAAE,OAAO,CACnB,CAAC","names":["z","Erc20RefSchema","z","AddressSchema","Erc20MetaSchema"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var m=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(e,r)=>{for(var t in r)m(e,t,{get:r[t],enumerable:!0})},f=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of s(r))!a.call(e,o)&&o!==t&&m(e,o,{get:()=>r[o],enumerable:!(n=p(r,o))||n.enumerable});return e};var g=e=>f(m({},"__esModule",{value:!0}),e);var E={};c(E,{ErrorLikeSchema:()=>k});module.exports=g(E);var i=require("zod"),k=i.z.object({name:i.z.string(),message:i.z.string()});0&&(module.exports={ErrorLikeSchema});
|
|
2
|
+
//# sourceMappingURL=error-like.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/common/error-like.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const ErrorLikeSchema = z.object({\n name: z.string(),\n message: z.string(),\n});\n\nexport type IErrorLike = z.infer<typeof ErrorLikeSchema>;\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAkB,eAELF,EAAkB,IAAE,OAAO,CACtC,KAAM,IAAE,OAAO,EACf,QAAS,IAAE,OAAO,CACpB,CAAC","names":["error_like_exports","__export","ErrorLikeSchema","__toCommonJS","import_zod"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const ErrorLikeSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
message: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
name: string;
|
|
8
|
+
message: string;
|
|
9
|
+
}, {
|
|
10
|
+
name: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}>;
|
|
13
|
+
type IErrorLike = z.infer<typeof ErrorLikeSchema>;
|
|
14
|
+
|
|
15
|
+
export { ErrorLikeSchema, type IErrorLike };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const ErrorLikeSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
message: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
name: string;
|
|
8
|
+
message: string;
|
|
9
|
+
}, {
|
|
10
|
+
name: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}>;
|
|
13
|
+
type IErrorLike = z.infer<typeof ErrorLikeSchema>;
|
|
14
|
+
|
|
15
|
+
export { ErrorLikeSchema, type IErrorLike };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},a=(e,t,n,m)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of b(t))!c.call(e,o)&&o!==n&&i(e,o,{get:()=>t[o],enumerable:!(m=u(t,o))||m.enumerable});return e};var h=e=>a(i({},"__esModule",{value:!0}),e);var d={};f(d,{ErrorLikeSchema:()=>j,HttpsUrlSchema:()=>y,IpfsUrlSchema:()=>N,NumberishJsonSchema:()=>g,NumberishSchema:()=>T,objectKeys:()=>I,stringIntToNumber:()=>S});module.exports=h(d);var r=require("zod"),T=r.z.union([r.z.string(),r.z.number(),r.z.bigint()]),g=r.z.union([r.z.string(),r.z.number()]);var p=require("zod"),y=p.z.string().url().refine(e=>e.startsWith("https://"),{message:"URL must start with https://"});var x=require("zod"),N=x.z.string().regex(/^ipfs:\/\/\S+$/,{message:"Must start with ipfs://"});function S(e){return parseInt(e)}function I(e){return Object.keys(e)}var s=require("zod"),j=s.z.object({name:s.z.string(),message:s.z.string()});0&&(module.exports={ErrorLikeSchema,HttpsUrlSchema,IpfsUrlSchema,NumberishJsonSchema,NumberishSchema,objectKeys,stringIntToNumber});
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/common/index.ts","../../src/common/numberish/numberish.ts","../../src/common/uri/https.ts","../../src/common/uri/ipfs.ts","../../src/common/stringIntToNumber/stringIntToNumber.ts","../../src/common/object-keys.ts","../../src/common/error-like.ts"],"sourcesContent":["export * from \"./numberish/numberish.js\";\nexport * from \"./uri/index.js\";\nexport * from \"./stringIntToNumber/stringIntToNumber.js\";\nexport * from \"./object-keys.js\";\nexport * from \"./error-like.js\";\n","import { z } from \"zod\";\n\nexport const NumberishSchema = z.union([z.string(), z.number(), z.bigint()]);\n\nexport type INumberish = z.input<typeof NumberishSchema>;\n\nexport const NumberishJsonSchema = z.union([z.string(), z.number()]);\n\nexport type INumberishJson = z.input<typeof NumberishSchema>;\n","import { z } from \"zod\";\n\nexport const HttpsUrlSchema = z\n .string()\n .url()\n .refine((val) => val.startsWith(\"https://\"), {\n message: \"URL must start with https://\",\n });\n","import { z } from \"zod\";\n\nexport const IpfsUrlSchema = z.string().regex(/^ipfs:\\/\\/\\S+$/, {\n message: \"Must start with ipfs://\",\n});\n","export type StringIntToNumber<T> = T extends `${infer N extends number}` ? N : never;\n\nexport function stringIntToNumber<T extends string>(x: T): StringIntToNumber<T> {\n return parseInt(x) as StringIntToNumber<T>;\n}\n","export type ObjectKeys<T> = T extends object\n ? (keyof T)[]\n : T extends number\n ? []\n : T extends Array<any> | string\n ? string[]\n : never;\n\nexport function objectKeys<T extends object>(obj: T): ObjectKeys<T> {\n return Object.keys(obj) as ObjectKeys<T>;\n}\n","import { z } from \"zod\";\n\nexport const ErrorLikeSchema = z.object({\n name: z.string(),\n message: z.string(),\n});\n\nexport type IErrorLike = z.infer<typeof ErrorLikeSchema>;\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,EAAA,mBAAAC,EAAA,kBAAAC,EAAA,wBAAAC,EAAA,oBAAAC,EAAA,eAAAC,EAAA,sBAAAC,IAAA,eAAAC,EAAAT,GCAA,IAAAU,EAAkB,eAELC,EAAkB,IAAE,MAAM,CAAC,IAAE,OAAO,EAAG,IAAE,OAAO,EAAG,IAAE,OAAO,CAAC,CAAC,EAI9DC,EAAsB,IAAE,MAAM,CAAC,IAAE,OAAO,EAAG,IAAE,OAAO,CAAC,CAAC,ECNnE,IAAAC,EAAkB,eAELC,EAAiB,IAC3B,OAAO,EACP,IAAI,EACJ,OAAQC,GAAQA,EAAI,WAAW,UAAU,EAAG,CAC3C,QAAS,8BACX,CAAC,ECPH,IAAAC,EAAkB,eAELC,EAAgB,IAAE,OAAO,EAAE,MAAM,iBAAkB,CAC9D,QAAS,yBACX,CAAC,ECFM,SAASC,EAAoCC,EAA4B,CAC9E,OAAO,SAASA,CAAC,CACnB,CCIO,SAASC,EAA6BC,EAAuB,CAClE,OAAO,OAAO,KAAKA,CAAG,CACxB,CCVA,IAAAC,EAAkB,eAELC,EAAkB,IAAE,OAAO,CACtC,KAAM,IAAE,OAAO,EACf,QAAS,IAAE,OAAO,CACpB,CAAC","names":["common_exports","__export","ErrorLikeSchema","HttpsUrlSchema","IpfsUrlSchema","NumberishJsonSchema","NumberishSchema","objectKeys","stringIntToNumber","__toCommonJS","import_zod","NumberishSchema","NumberishJsonSchema","import_zod","HttpsUrlSchema","val","import_zod","IpfsUrlSchema","stringIntToNumber","x","objectKeys","obj","import_zod","ErrorLikeSchema"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { INumberish, INumberishJson, NumberishJsonSchema, NumberishSchema } from './numberish/numberish.cjs';
|
|
2
|
+
export { HttpsUrlSchema } from './uri/https.cjs';
|
|
3
|
+
export { IpfsUrlSchema } from './uri/ipfs.cjs';
|
|
4
|
+
export { StringIntToNumber, stringIntToNumber } from './stringIntToNumber/stringIntToNumber.cjs';
|
|
5
|
+
export { ObjectKeys, objectKeys } from './object-keys.cjs';
|
|
6
|
+
export { ErrorLikeSchema, IErrorLike } from './error-like.cjs';
|
|
7
|
+
import 'zod';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { INumberish, INumberishJson, NumberishJsonSchema, NumberishSchema } from './numberish/numberish.js';
|
|
2
|
+
export { HttpsUrlSchema } from './uri/https.js';
|
|
3
|
+
export { IpfsUrlSchema } from './uri/ipfs.js';
|
|
4
|
+
export { StringIntToNumber, stringIntToNumber } from './stringIntToNumber/stringIntToNumber.js';
|
|
5
|
+
export { ObjectKeys, objectKeys } from './object-keys.js';
|
|
6
|
+
export { ErrorLikeSchema, IErrorLike } from './error-like.js';
|
|
7
|
+
import 'zod';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunk-2RUMPEU7.js";import{a as p}from"../chunk-3O2X45IG.js";import{a as o}from"../chunk-YWLL3DQU.js";import{a as t}from"../chunk-REPE7APZ.js";import{a as f}from"../chunk-CA4TYRQC.js";import{a as m}from"../chunk-2KI5OZLW.js";import{a as r,b as e}from"../chunk-VTUC735Y.js";export{o as ErrorLikeSchema,f as HttpsUrlSchema,m as IpfsUrlSchema,e as NumberishJsonSchema,r as NumberishSchema,t as objectKeys,p as stringIntToNumber};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var m=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var h=(t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})},b=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of u(e))!p.call(t,i)&&i!==n&&m(t,i,{get:()=>e[i],enumerable:!(o=s(e,i))||o.enumerable});return t};var c=t=>b(m({},"__esModule",{value:!0}),t);var x={};h(x,{NumberishJsonSchema:()=>a,NumberishSchema:()=>N});module.exports=c(x);var r=require("zod"),N=r.z.union([r.z.string(),r.z.number(),r.z.bigint()]),a=r.z.union([r.z.string(),r.z.number()]);0&&(module.exports={NumberishJsonSchema,NumberishSchema});
|
|
2
|
+
//# sourceMappingURL=numberish.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/common/numberish/numberish.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const NumberishSchema = z.union([z.string(), z.number(), z.bigint()]);\n\nexport type INumberish = z.input<typeof NumberishSchema>;\n\nexport const NumberishJsonSchema = z.union([z.string(), z.number()]);\n\nexport type INumberishJson = z.input<typeof NumberishSchema>;\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,EAAA,oBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAkB,eAELF,EAAkB,IAAE,MAAM,CAAC,IAAE,OAAO,EAAG,IAAE,OAAO,EAAG,IAAE,OAAO,CAAC,CAAC,EAI9DD,EAAsB,IAAE,MAAM,CAAC,IAAE,OAAO,EAAG,IAAE,OAAO,CAAC,CAAC","names":["numberish_exports","__export","NumberishJsonSchema","NumberishSchema","__toCommonJS","import_zod"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const NumberishSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>;
|
|
4
|
+
type INumberish = z.input<typeof NumberishSchema>;
|
|
5
|
+
declare const NumberishJsonSchema: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
6
|
+
type INumberishJson = z.input<typeof NumberishSchema>;
|
|
7
|
+
|
|
8
|
+
export { type INumberish, type INumberishJson, NumberishJsonSchema, NumberishSchema };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const NumberishSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>;
|
|
4
|
+
type INumberish = z.input<typeof NumberishSchema>;
|
|
5
|
+
declare const NumberishJsonSchema: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
6
|
+
type INumberishJson = z.input<typeof NumberishSchema>;
|
|
7
|
+
|
|
8
|
+
export { type INumberish, type INumberishJson, NumberishJsonSchema, NumberishSchema };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";var r=require("zod");var e=require("zod"),i=e.z.union([e.z.string(),e.z.number(),e.z.bigint()]),t=e.z.union([e.z.string(),e.z.number()]);describe("numberish",()=>{it("should parse numeric string",()=>{expect(i.pipe(r.z.coerce.bigint()).parse("1")).toEqual(BigInt(1))}),it("should parse numeric bigint",()=>{expect(i.pipe(r.z.coerce.bigint()).parse(BigInt(1))).toEqual(BigInt(1))}),it("should parse number",()=>{expect(i.pipe(r.z.coerce.bigint()).parse(1)).toEqual(BigInt(1))}),it("should return error when not a numeric value",()=>{expect(i.pipe(r.z.coerce.bigint()).safeParse("s")).toMatchInlineSnapshot(`
|
|
2
|
+
{
|
|
3
|
+
"error": [ZodError: [
|
|
4
|
+
{
|
|
5
|
+
"code": "invalid_type",
|
|
6
|
+
"expected": "bigint",
|
|
7
|
+
"received": "string",
|
|
8
|
+
"path": [],
|
|
9
|
+
"message": "Expected bigint, received string"
|
|
10
|
+
}
|
|
11
|
+
]],
|
|
12
|
+
"success": false,
|
|
13
|
+
}
|
|
14
|
+
`)})});
|
|
15
|
+
//# sourceMappingURL=numberish.test.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/common/numberish/numberish.test.ts","../../../src/common/numberish/numberish.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { NumberishSchema } from \"./numberish.js\";\n\ndescribe(\"numberish\", () => {\n it(\"should parse numeric string\", () => {\n expect(NumberishSchema.pipe(z.coerce.bigint()).parse(\"1\")).toEqual(BigInt(1));\n });\n\n it(\"should parse numeric bigint\", () => {\n expect(NumberishSchema.pipe(z.coerce.bigint()).parse(BigInt(1))).toEqual(BigInt(1));\n });\n\n it(\"should parse number\", () => {\n expect(NumberishSchema.pipe(z.coerce.bigint()).parse(1)).toEqual(BigInt(1));\n });\n\n it(\"should return error when not a numeric value\", () => {\n expect(NumberishSchema.pipe(z.coerce.bigint()).safeParse(\"s\")).toMatchInlineSnapshot(`\n {\n \"error\": [ZodError: [\n {\n \"code\": \"invalid_type\",\n \"expected\": \"bigint\",\n \"received\": \"string\",\n \"path\": [],\n \"message\": \"Expected bigint, received string\"\n }\n ]],\n \"success\": false,\n }\n `);\n });\n});\n","import { z } from \"zod\";\n\nexport const NumberishSchema = z.union([z.string(), z.number(), z.bigint()]);\n\nexport type INumberish = z.input<typeof NumberishSchema>;\n\nexport const NumberishJsonSchema = z.union([z.string(), z.number()]);\n\nexport type INumberishJson = z.input<typeof NumberishSchema>;\n"],"mappings":"aAAA,IAAAA,EAAkB,eCAlB,IAAAC,EAAkB,eAELC,EAAkB,IAAE,MAAM,CAAC,IAAE,OAAO,EAAG,IAAE,OAAO,EAAG,IAAE,OAAO,CAAC,CAAC,EAI9DC,EAAsB,IAAE,MAAM,CAAC,IAAE,OAAO,EAAG,IAAE,OAAO,CAAC,CAAC,EDHnE,SAAS,YAAa,IAAM,CAC1B,GAAG,8BAA+B,IAAM,CACtC,OAAOC,EAAgB,KAAK,IAAE,OAAO,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,QAAQ,OAAO,CAAC,CAAC,CAC9E,CAAC,EAED,GAAG,8BAA+B,IAAM,CACtC,OAAOA,EAAgB,KAAK,IAAE,OAAO,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,OAAO,CAAC,CAAC,CACpF,CAAC,EAED,GAAG,sBAAuB,IAAM,CAC9B,OAAOA,EAAgB,KAAK,IAAE,OAAO,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,OAAO,CAAC,CAAC,CAC5E,CAAC,EAED,GAAG,+CAAgD,IAAM,CACvD,OAAOA,EAAgB,KAAK,IAAE,OAAO,OAAO,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAapF,CACH,CAAC,CACH,CAAC","names":["import_zod","import_zod","NumberishSchema","NumberishJsonSchema","NumberishSchema"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{a as e}from"../../chunk-VTUC735Y.js";import{z as i}from"zod";describe("numberish",()=>{it("should parse numeric string",()=>{expect(e.pipe(i.coerce.bigint()).parse("1")).toEqual(BigInt(1))}),it("should parse numeric bigint",()=>{expect(e.pipe(i.coerce.bigint()).parse(BigInt(1))).toEqual(BigInt(1))}),it("should parse number",()=>{expect(e.pipe(i.coerce.bigint()).parse(1)).toEqual(BigInt(1))}),it("should return error when not a numeric value",()=>{expect(e.pipe(i.coerce.bigint()).safeParse("s")).toMatchInlineSnapshot(`
|
|
2
|
+
{
|
|
3
|
+
"error": [ZodError: [
|
|
4
|
+
{
|
|
5
|
+
"code": "invalid_type",
|
|
6
|
+
"expected": "bigint",
|
|
7
|
+
"received": "string",
|
|
8
|
+
"path": [],
|
|
9
|
+
"message": "Expected bigint, received string"
|
|
10
|
+
}
|
|
11
|
+
]],
|
|
12
|
+
"success": false,
|
|
13
|
+
}
|
|
14
|
+
`)})});
|
|
15
|
+
//# sourceMappingURL=numberish.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/common/numberish/numberish.test.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { NumberishSchema } from \"./numberish.js\";\n\ndescribe(\"numberish\", () => {\n it(\"should parse numeric string\", () => {\n expect(NumberishSchema.pipe(z.coerce.bigint()).parse(\"1\")).toEqual(BigInt(1));\n });\n\n it(\"should parse numeric bigint\", () => {\n expect(NumberishSchema.pipe(z.coerce.bigint()).parse(BigInt(1))).toEqual(BigInt(1));\n });\n\n it(\"should parse number\", () => {\n expect(NumberishSchema.pipe(z.coerce.bigint()).parse(1)).toEqual(BigInt(1));\n });\n\n it(\"should return error when not a numeric value\", () => {\n expect(NumberishSchema.pipe(z.coerce.bigint()).safeParse(\"s\")).toMatchInlineSnapshot(`\n {\n \"error\": [ZodError: [\n {\n \"code\": \"invalid_type\",\n \"expected\": \"bigint\",\n \"received\": \"string\",\n \"path\": [],\n \"message\": \"Expected bigint, received string\"\n }\n ]],\n \"success\": false,\n }\n `);\n });\n});\n"],"mappings":"4CAAA,OAAS,KAAAA,MAAS,MAGlB,SAAS,YAAa,IAAM,CAC1B,GAAG,8BAA+B,IAAM,CACtC,OAAOC,EAAgB,KAAKC,EAAE,OAAO,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,QAAQ,OAAO,CAAC,CAAC,CAC9E,CAAC,EAED,GAAG,8BAA+B,IAAM,CACtC,OAAOD,EAAgB,KAAKC,EAAE,OAAO,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,OAAO,CAAC,CAAC,CACpF,CAAC,EAED,GAAG,sBAAuB,IAAM,CAC9B,OAAOD,EAAgB,KAAKC,EAAE,OAAO,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,OAAO,CAAC,CAAC,CAC5E,CAAC,EAED,GAAG,+CAAgD,IAAM,CACvD,OAAOD,EAAgB,KAAKC,EAAE,OAAO,OAAO,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAapF,CACH,CAAC,CACH,CAAC","names":["z","NumberishSchema","z"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var j=(e,t)=>{for(var s in t)r(e,s,{get:t[s],enumerable:!0})},o=(e,t,s,y)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of b(t))!c.call(e,n)&&n!==s&&r(e,n,{get:()=>t[n],enumerable:!(y=T(t,n))||y.enumerable});return e};var x=e=>o(r({},"__esModule",{value:!0}),e);var K={};j(K,{objectKeys:()=>d});module.exports=x(K);function d(e){return Object.keys(e)}0&&(module.exports={objectKeys});
|
|
2
|
+
//# sourceMappingURL=object-keys.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/common/object-keys.ts"],"sourcesContent":["export type ObjectKeys<T> = T extends object\n ? (keyof T)[]\n : T extends number\n ? []\n : T extends Array<any> | string\n ? string[]\n : never;\n\nexport function objectKeys<T extends object>(obj: T): ObjectKeys<T> {\n return Object.keys(obj) as ObjectKeys<T>;\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAQO,SAASE,EAA6BE,EAAuB,CAClE,OAAO,OAAO,KAAKA,CAAG,CACxB","names":["object_keys_exports","__export","objectKeys","__toCommonJS","obj"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var T=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var N=(e,n)=>{for(var r in n)T(e,r,{get:n[r],enumerable:!0})},b=(e,n,r,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of s(n))!u.call(e,t)&&t!==r&&T(e,t,{get:()=>n[t],enumerable:!(i=o(n,t))||i.enumerable});return e};var g=e=>b(T({},"__esModule",{value:!0}),e);var x={};N(x,{stringIntToNumber:()=>m});module.exports=g(x);function m(e){return parseInt(e)}0&&(module.exports={stringIntToNumber});
|
|
2
|
+
//# sourceMappingURL=stringIntToNumber.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/common/stringIntToNumber/stringIntToNumber.ts"],"sourcesContent":["export type StringIntToNumber<T> = T extends `${infer N extends number}` ? N : never;\n\nexport function stringIntToNumber<T extends string>(x: T): StringIntToNumber<T> {\n return parseInt(x) as StringIntToNumber<T>;\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,IAAA,eAAAC,EAAAH,GAEO,SAASE,EAAoCE,EAA4B,CAC9E,OAAO,SAASA,CAAC,CACnB","names":["stringIntToNumber_exports","__export","stringIntToNumber","__toCommonJS","x"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/common/stringIntToNumber/stringIntToNumber.ts","../../../src/common/stringIntToNumber/stringIntToNumber.test.ts"],"sourcesContent":["export type StringIntToNumber<T> = T extends `${infer N extends number}` ? N : never;\n\nexport function stringIntToNumber<T extends string>(x: T): StringIntToNumber<T> {\n return parseInt(x) as StringIntToNumber<T>;\n}\n","import { stringIntToNumber } from \"./stringIntToNumber.js\";\n\ndescribe(\"stringIntToNumber\", () => {\n it(\"should parse int and expect valid type\", () => {\n expect(stringIntToNumber(\"42\")).to.equal(42);\n expectTypeOf(stringIntToNumber(\"42\")).toEqualTypeOf<42>();\n });\n});\n"],"mappings":"aAEO,SAASA,EAAoCC,EAA4B,CAC9E,OAAO,SAASA,CAAC,CACnB,CCFA,SAAS,oBAAqB,IAAM,CAClC,GAAG,yCAA0C,IAAM,CACjD,OAAOC,EAAkB,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,EAC3C,aAAaA,EAAkB,IAAI,CAAC,EAAE,cAAkB,CAC1D,CAAC,CACH,CAAC","names":["stringIntToNumber","x","stringIntToNumber"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/common/stringIntToNumber/stringIntToNumber.test.ts"],"sourcesContent":["import { stringIntToNumber } from \"./stringIntToNumber.js\";\n\ndescribe(\"stringIntToNumber\", () => {\n it(\"should parse int and expect valid type\", () => {\n expect(stringIntToNumber(\"42\")).to.equal(42);\n expectTypeOf(stringIntToNumber(\"42\")).toEqualTypeOf<42>();\n });\n});\n"],"mappings":"4CAEA,SAAS,oBAAqB,IAAM,CAClC,GAAG,yCAA0C,IAAM,CACjD,OAAOA,EAAkB,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,EAC3C,aAAaA,EAAkB,IAAI,CAAC,EAAE,cAAkB,CAC1D,CAAC,CACH,CAAC","names":["stringIntToNumber"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var h=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var n=(t,s)=>{for(var e in s)h(t,e,{get:s[e],enumerable:!0})},c=(t,s,e,i)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of a(s))!o.call(t,r)&&r!==e&&h(t,r,{get:()=>s[r],enumerable:!(i=p(s,r))||i.enumerable});return t};var f=t=>c(h({},"__esModule",{value:!0}),t);var l={};n(l,{HttpsUrlSchema:()=>g});module.exports=f(l);var m=require("zod"),g=m.z.string().url().refine(t=>t.startsWith("https://"),{message:"URL must start with https://"});0&&(module.exports={HttpsUrlSchema});
|
|
2
|
+
//# sourceMappingURL=https.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/common/uri/https.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const HttpsUrlSchema = z\n .string()\n .url()\n .refine((val) => val.startsWith(\"https://\"), {\n message: \"URL must start with https://\",\n });\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAkB,eAELF,EAAiB,IAC3B,OAAO,EACP,IAAI,EACJ,OAAQG,GAAQA,EAAI,WAAW,UAAU,EAAG,CAC3C,QAAS,8BACX,CAAC","names":["https_exports","__export","HttpsUrlSchema","__toCommonJS","import_zod","val"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var g=(t,r)=>{for(var e in r)o(t,e,{get:r[e],enumerable:!0})},n=(t,r,e,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of a(r))!h.call(t,s)&&s!==e&&o(t,s,{get:()=>r[s],enumerable:!(p=f(r,s))||p.enumerable});return t};var x=t=>n(o({},"__esModule",{value:!0}),t);var u={};g(u,{HttpsUrlSchema:()=>c,IpfsUrlSchema:()=>l});module.exports=x(u);var m=require("zod"),c=m.z.string().url().refine(t=>t.startsWith("https://"),{message:"URL must start with https://"});var i=require("zod"),l=i.z.string().regex(/^ipfs:\/\/\S+$/,{message:"Must start with ipfs://"});0&&(module.exports={HttpsUrlSchema,IpfsUrlSchema});
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/common/uri/index.ts","../../../src/common/uri/https.ts","../../../src/common/uri/ipfs.ts"],"sourcesContent":["export * from \"./https.js\";\nexport * from \"./ipfs.js\";\n","import { z } from \"zod\";\n\nexport const HttpsUrlSchema = z\n .string()\n .url()\n .refine((val) => val.startsWith(\"https://\"), {\n message: \"URL must start with https://\",\n });\n","import { z } from \"zod\";\n\nexport const IpfsUrlSchema = z.string().regex(/^ipfs:\\/\\/\\S+$/, {\n message: \"Must start with ipfs://\",\n});\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,kBAAAC,IAAA,eAAAC,EAAAJ,GCAA,IAAAK,EAAkB,eAELC,EAAiB,IAC3B,OAAO,EACP,IAAI,EACJ,OAAQC,GAAQA,EAAI,WAAW,UAAU,EAAG,CAC3C,QAAS,8BACX,CAAC,ECPH,IAAAC,EAAkB,eAELC,EAAgB,IAAE,OAAO,EAAE,MAAM,iBAAkB,CAC9D,QAAS,yBACX,CAAC","names":["uri_exports","__export","HttpsUrlSchema","IpfsUrlSchema","__toCommonJS","import_zod","HttpsUrlSchema","val","import_zod","IpfsUrlSchema"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var g=(t,s)=>{for(var e in s)i(t,e,{get:s[e],enumerable:!0})},c=(t,s,e,p)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of o(s))!a.call(t,r)&&r!==e&&i(t,r,{get:()=>s[r],enumerable:!(p=m(s,r))||p.enumerable});return t};var h=t=>c(i({},"__esModule",{value:!0}),t);var x={};g(x,{IpfsUrlSchema:()=>n});module.exports=h(x);var f=require("zod"),n=f.z.string().regex(/^ipfs:\/\/\S+$/,{message:"Must start with ipfs://"});0&&(module.exports={IpfsUrlSchema});
|
|
2
|
+
//# sourceMappingURL=ipfs.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/common/uri/ipfs.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const IpfsUrlSchema = z.string().regex(/^ipfs:\\/\\/\\S+$/, {\n message: \"Must start with ipfs://\",\n});\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAkB,eAELF,EAAgB,IAAE,OAAO,EAAE,MAAM,iBAAkB,CAC9D,QAAS,yBACX,CAAC","names":["ipfs_exports","__export","IpfsUrlSchema","__toCommonJS","import_zod"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var p=(d,s)=>{for(var e in s)o(d,e,{get:s[e],enumerable:!0})},f=(d,s,e,m)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of A(s))!c.call(d,r)&&r!==e&&o(d,r,{get:()=>s[r],enumerable:!(m=i(s,r))||m.enumerable});return d};var g=d=>f(o({},"__esModule",{value:!0}),d);var h={};p(h,{AddressSchema:()=>n});module.exports=g(h);var t=require("zod"),a=require("viem"),n=t.z.custom(a.isAddress,{message:"Not a valid address string"});0&&(module.exports={AddressSchema});
|
|
2
|
+
//# sourceMappingURL=address.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/evm/address.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { Address, isAddress } from \"viem\";\n\nexport const AddressSchema = z.custom<Address>(isAddress, { message: \"Not a valid address string\" });\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAkB,eAClBC,EAAmC,gBAEtBH,EAAgB,IAAE,OAAgB,YAAW,CAAE,QAAS,4BAA6B,CAAC","names":["address_exports","__export","AddressSchema","__toCommonJS","import_zod","import_viem"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var N=(t,r)=>{for(var m in r)i(t,m,{get:r[m],enumerable:!0})},l=(t,r,m,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of g(r))!x.call(t,o)&&o!==m&&i(t,o,{get:()=>r[o],enumerable:!(p=S(r,o))||p.enumerable});return t};var z=t=>l(i({},"__esModule",{value:!0}),t);var A={};N(A,{Erc1155MetaSchema:()=>y,Erc1155RefSchema:()=>U});module.exports=z(A);var s=require("zod");var n=require("zod"),c=require("viem"),a=n.z.custom(c.isAddress,{message:"Not a valid address string"});var e=require("zod"),h=e.z.union([e.z.string(),e.z.number(),e.z.bigint()]),E=e.z.union([e.z.string(),e.z.number()]);var f=require("zod"),u=f.z.string().regex(/^ipfs:\/\/\S+$/,{message:"Must start with ipfs://"});var b=require("zod"),d=b.z.string().url().refine(t=>t.startsWith("https://"),{message:"URL must start with https://"});var U=s.z.object({contract:a,tokenId:h.pipe(s.z.bigint())}),y=s.z.object({baseUri:s.z.union([u,d]),name:s.z.string(),symbol:s.z.string()});0&&(module.exports={Erc1155MetaSchema,Erc1155RefSchema});
|
|
2
|
+
//# sourceMappingURL=erc1155.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/evm/erc1155.ts","../../src/evm/address.ts","../../src/common/numberish/numberish.ts","../../src/common/uri/ipfs.ts","../../src/common/uri/https.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { AddressSchema } from \"./address.js\";\nimport { NumberishSchema } from \"../common/numberish/numberish.js\";\nimport { IpfsUrlSchema } from \"../common/uri/ipfs.js\";\nimport { HttpsUrlSchema } from \"../common/uri/https.js\";\n\nexport const Erc1155RefSchema = z.object({\n contract: AddressSchema,\n tokenId: NumberishSchema.pipe(z.bigint()),\n});\n\nexport const Erc1155MetaSchema = z.object({\n baseUri: z.union([IpfsUrlSchema, HttpsUrlSchema]),\n name: z.string(),\n symbol: z.string(),\n});\n","import { z } from \"zod\";\nimport { Address, isAddress } from \"viem\";\n\nexport const AddressSchema = z.custom<Address>(isAddress, { message: \"Not a valid address string\" });\n","import { z } from \"zod\";\n\nexport const NumberishSchema = z.union([z.string(), z.number(), z.bigint()]);\n\nexport type INumberish = z.input<typeof NumberishSchema>;\n\nexport const NumberishJsonSchema = z.union([z.string(), z.number()]);\n\nexport type INumberishJson = z.input<typeof NumberishSchema>;\n","import { z } from \"zod\";\n\nexport const IpfsUrlSchema = z.string().regex(/^ipfs:\\/\\/\\S+$/, {\n message: \"Must start with ipfs://\",\n});\n","import { z } from \"zod\";\n\nexport const HttpsUrlSchema = z\n .string()\n .url()\n .refine((val) => val.startsWith(\"https://\"), {\n message: \"URL must start with https://\",\n });\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,EAAA,qBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAkB,eCAlB,IAAAC,EAAkB,eAClBC,EAAmC,gBAEtBC,EAAgB,IAAE,OAAgB,YAAW,CAAE,QAAS,4BAA6B,CAAC,ECHnG,IAAAC,EAAkB,eAELC,EAAkB,IAAE,MAAM,CAAC,IAAE,OAAO,EAAG,IAAE,OAAO,EAAG,IAAE,OAAO,CAAC,CAAC,EAI9DC,EAAsB,IAAE,MAAM,CAAC,IAAE,OAAO,EAAG,IAAE,OAAO,CAAC,CAAC,ECNnE,IAAAC,EAAkB,eAELC,EAAgB,IAAE,OAAO,EAAE,MAAM,iBAAkB,CAC9D,QAAS,yBACX,CAAC,ECJD,IAAAC,EAAkB,eAELC,EAAiB,IAC3B,OAAO,EACP,IAAI,EACJ,OAAQC,GAAQA,EAAI,WAAW,UAAU,EAAG,CAC3C,QAAS,8BACX,CAAC,EJDI,IAAMC,EAAmB,IAAE,OAAO,CACvC,SAAUC,EACV,QAASC,EAAgB,KAAK,IAAE,OAAO,CAAC,CAC1C,CAAC,EAEYC,EAAoB,IAAE,OAAO,CACxC,QAAS,IAAE,MAAM,CAACC,EAAeC,CAAc,CAAC,EAChD,KAAM,IAAE,OAAO,EACf,OAAQ,IAAE,OAAO,CACnB,CAAC","names":["erc1155_exports","__export","Erc1155MetaSchema","Erc1155RefSchema","__toCommonJS","import_zod","import_zod","import_viem","AddressSchema","import_zod","NumberishSchema","NumberishJsonSchema","import_zod","IpfsUrlSchema","import_zod","HttpsUrlSchema","val","Erc1155RefSchema","AddressSchema","NumberishSchema","Erc1155MetaSchema","IpfsUrlSchema","HttpsUrlSchema"]}
|