Comparing version 0.9.8 to 0.9.9
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = '0.9.8'; | ||
exports.version = '0.9.9'; | ||
//# sourceMappingURL=version.js.map |
@@ -159,3 +159,2 @@ "use strict"; | ||
payable: zod_1.z.boolean().optional(), | ||
stateMutability: exports.AbiStateMutability, | ||
}), zod_1.z.discriminatedUnion('type', [ | ||
@@ -167,2 +166,3 @@ zod_1.z.object({ | ||
outputs: zod_1.z.array(exports.AbiParameter), | ||
stateMutability: exports.AbiStateMutability, | ||
}), | ||
@@ -172,2 +172,6 @@ zod_1.z.object({ | ||
inputs: zod_1.z.array(exports.AbiParameter), | ||
stateMutability: zod_1.z.union([ | ||
zod_1.z.literal('payable'), | ||
zod_1.z.literal('nonpayable'), | ||
]), | ||
}), | ||
@@ -177,2 +181,6 @@ zod_1.z.object({ | ||
inputs: zod_1.z.tuple([]).optional(), | ||
stateMutability: zod_1.z.union([ | ||
zod_1.z.literal('payable'), | ||
zod_1.z.literal('nonpayable'), | ||
]), | ||
}), | ||
@@ -179,0 +187,0 @@ zod_1.z.object({ |
@@ -1,2 +0,2 @@ | ||
export const version = '0.9.8'; | ||
export const version = '0.9.9'; | ||
//# sourceMappingURL=version.js.map |
@@ -156,3 +156,2 @@ import { z } from 'zod'; | ||
payable: z.boolean().optional(), | ||
stateMutability: AbiStateMutability, | ||
}), z.discriminatedUnion('type', [ | ||
@@ -164,2 +163,3 @@ z.object({ | ||
outputs: z.array(AbiParameter), | ||
stateMutability: AbiStateMutability, | ||
}), | ||
@@ -169,2 +169,6 @@ z.object({ | ||
inputs: z.array(AbiParameter), | ||
stateMutability: z.union([ | ||
z.literal('payable'), | ||
z.literal('nonpayable'), | ||
]), | ||
}), | ||
@@ -174,2 +178,6 @@ z.object({ | ||
inputs: z.tuple([]).optional(), | ||
stateMutability: z.union([ | ||
z.literal('payable'), | ||
z.literal('nonpayable'), | ||
]), | ||
}), | ||
@@ -176,0 +184,0 @@ z.object({ |
@@ -1,2 +0,2 @@ | ||
export declare const version = "0.9.8"; | ||
export declare const version = "0.9.9"; | ||
//# sourceMappingURL=version.d.ts.map |
import { z } from 'zod'; | ||
import type { AbiParameter as AbiParameterType } from './abi.js'; | ||
import type { AbiEventParameter as AbiEventParameterType, AbiParameter as AbiParameterType } from './abi.js'; | ||
export declare const Address: z.ZodEffects<z.ZodString, `0x${string}`, string>; | ||
@@ -15,9 +15,3 @@ export declare const SolidityAddress: z.ZodLiteral<"address">; | ||
export declare const AbiParameter: z.ZodType<AbiParameterType>; | ||
export declare const AbiEventParameter: z.ZodIntersection<z.ZodType<AbiParameterType, z.ZodTypeDef, AbiParameterType>, z.ZodObject<{ | ||
indexed: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
indexed?: boolean | undefined; | ||
}, { | ||
indexed?: boolean | undefined; | ||
}>>; | ||
export declare const AbiEventParameter: z.ZodType<AbiEventParameterType>; | ||
export declare const AbiStateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>; | ||
@@ -144,9 +138,3 @@ export declare const AbiFunction: z.ZodEffects<z.ZodObject<{ | ||
anonymous: z.ZodOptional<z.ZodBoolean>; | ||
inputs: z.ZodArray<z.ZodIntersection<z.ZodType<AbiParameterType, z.ZodTypeDef, AbiParameterType>, z.ZodObject<{ | ||
indexed: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
indexed?: boolean | undefined; | ||
}, { | ||
indexed?: boolean | undefined; | ||
}>>, "many">; | ||
inputs: z.ZodArray<z.ZodType<AbiEventParameterType, z.ZodTypeDef, AbiEventParameterType>, "many">; | ||
name: z.ZodString; | ||
@@ -156,5 +144,3 @@ }, "strip", z.ZodTypeAny, { | ||
name: string; | ||
inputs: (AbiParameterType & { | ||
indexed?: boolean | undefined; | ||
})[]; | ||
inputs: AbiEventParameterType[]; | ||
anonymous?: boolean | undefined; | ||
@@ -164,5 +150,3 @@ }, { | ||
name: string; | ||
inputs: (AbiParameterType & { | ||
indexed?: boolean | undefined; | ||
})[]; | ||
inputs: AbiEventParameterType[]; | ||
anonymous?: boolean | undefined; | ||
@@ -205,9 +189,3 @@ }>; | ||
anonymous: z.ZodOptional<z.ZodBoolean>; | ||
inputs: z.ZodArray<z.ZodIntersection<z.ZodType<AbiParameterType, z.ZodTypeDef, AbiParameterType>, z.ZodObject<{ | ||
indexed: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
indexed?: boolean | undefined; | ||
}, { | ||
indexed?: boolean | undefined; | ||
}>>, "many">; | ||
inputs: z.ZodArray<z.ZodType<AbiEventParameterType, z.ZodTypeDef, AbiEventParameterType>, "many">; | ||
name: z.ZodString; | ||
@@ -217,5 +195,3 @@ }, "strip", z.ZodTypeAny, { | ||
name: string; | ||
inputs: (AbiParameterType & { | ||
indexed?: boolean | undefined; | ||
})[]; | ||
inputs: AbiEventParameterType[]; | ||
anonymous?: boolean | undefined; | ||
@@ -225,5 +201,3 @@ }, { | ||
name: string; | ||
inputs: (AbiParameterType & { | ||
indexed?: boolean | undefined; | ||
})[]; | ||
inputs: AbiEventParameterType[]; | ||
anonymous?: boolean | undefined; | ||
@@ -246,5 +220,3 @@ }>, z.ZodEffects<z.ZodIntersection<z.ZodObject<{ | ||
payable: z.ZodOptional<z.ZodBoolean>; | ||
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>; | ||
}, "strip", z.ZodTypeAny, { | ||
stateMutability: "pure" | "view" | "nonpayable" | "payable"; | ||
constant?: boolean | undefined; | ||
@@ -254,3 +226,2 @@ gas?: number | undefined; | ||
}, { | ||
stateMutability: "pure" | "view" | "nonpayable" | "payable"; | ||
constant?: boolean | undefined; | ||
@@ -264,2 +235,3 @@ gas?: number | undefined; | ||
outputs: z.ZodArray<z.ZodType<AbiParameterType, z.ZodTypeDef, AbiParameterType>, "many">; | ||
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>; | ||
}, "strip", z.ZodTypeAny, { | ||
@@ -270,2 +242,3 @@ type: "function"; | ||
outputs: AbiParameterType[]; | ||
stateMutability: "pure" | "view" | "nonpayable" | "payable"; | ||
}, { | ||
@@ -276,19 +249,26 @@ type: "function"; | ||
outputs: AbiParameterType[]; | ||
stateMutability: "pure" | "view" | "nonpayable" | "payable"; | ||
}>, z.ZodObject<{ | ||
type: z.ZodLiteral<"constructor">; | ||
inputs: z.ZodArray<z.ZodType<AbiParameterType, z.ZodTypeDef, AbiParameterType>, "many">; | ||
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "constructor"; | ||
inputs: AbiParameterType[]; | ||
stateMutability: "nonpayable" | "payable"; | ||
}, { | ||
type: "constructor"; | ||
inputs: AbiParameterType[]; | ||
stateMutability: "nonpayable" | "payable"; | ||
}>, z.ZodObject<{ | ||
type: z.ZodLiteral<"fallback">; | ||
inputs: z.ZodOptional<z.ZodTuple<[], null>>; | ||
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "fallback"; | ||
stateMutability: "nonpayable" | "payable"; | ||
inputs?: [] | undefined; | ||
}, { | ||
type: "fallback"; | ||
stateMutability: "nonpayable" | "payable"; | ||
inputs?: [] | undefined; | ||
@@ -305,3 +285,2 @@ }>, z.ZodObject<{ | ||
}>]>>, { | ||
stateMutability: "pure" | "view" | "nonpayable" | "payable"; | ||
constant?: boolean | undefined; | ||
@@ -315,7 +294,10 @@ gas?: number | undefined; | ||
outputs: AbiParameterType[]; | ||
stateMutability: "pure" | "view" | "nonpayable" | "payable"; | ||
} | { | ||
type: "constructor"; | ||
inputs: AbiParameterType[]; | ||
stateMutability: "nonpayable" | "payable"; | ||
} | { | ||
type: "fallback"; | ||
stateMutability: "nonpayable" | "payable"; | ||
inputs?: [] | undefined; | ||
@@ -322,0 +304,0 @@ } | { |
{ | ||
"name": "abitype", | ||
"description": "Strict TypeScript types for Ethereum ABIs", | ||
"version": "0.9.8", | ||
"version": "0.9.9", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": "wagmi-dev/abitype", |
@@ -1,1 +0,1 @@ | ||
export const version = '0.9.8' | ||
export const version = '0.9.9' |
@@ -5,2 +5,3 @@ import { z } from 'zod' | ||
AbiConstructor as AbiConstructorType, | ||
AbiEventParameter as AbiEventParameterType, | ||
AbiFallback as AbiFallbackType, | ||
@@ -80,6 +81,4 @@ AbiFunction as AbiFunctionType, | ||
export const AbiEventParameter = z.intersection( | ||
AbiParameter, | ||
z.object({ indexed: z.boolean().optional() }), | ||
) | ||
export const AbiEventParameter: z.ZodType<AbiEventParameterType> = | ||
z.intersection(AbiParameter, z.object({ indexed: z.boolean().optional() })) | ||
@@ -265,3 +264,2 @@ export const AbiStateMutability = z.union([ | ||
payable: z.boolean().optional(), | ||
stateMutability: AbiStateMutability, | ||
}), | ||
@@ -274,2 +272,3 @@ z.discriminatedUnion('type', [ | ||
outputs: z.array(AbiParameter), | ||
stateMutability: AbiStateMutability, | ||
}), | ||
@@ -279,2 +278,6 @@ z.object({ | ||
inputs: z.array(AbiParameter), | ||
stateMutability: z.union([ | ||
z.literal('payable'), | ||
z.literal('nonpayable'), | ||
]), | ||
}), | ||
@@ -284,2 +287,6 @@ z.object({ | ||
inputs: z.tuple([]).optional(), | ||
stateMutability: z.union([ | ||
z.literal('payable'), | ||
z.literal('nonpayable'), | ||
]), | ||
}), | ||
@@ -286,0 +293,0 @@ z.object({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1172359
24139