input — a Standard Schema that validates the arguments tuple.
Callbacks are excluded (see FilterCallbacks), so for a method like
add(a: number, b: number) the schema would be z.tuple([z.number(), z.number()]).
output — a Standard Schema that validates the return value
(unwrapped from Promise), e.g. z.number() for Promise<number>.
Both are optional — you can validate only inputs, only outputs, or both.
Validator definition for a single RPC method.
input— a Standard Schema that validates the arguments tuple. Callbacks are excluded (seeFilterCallbacks), so for a method likeadd(a: number, b: number)the schema would bez.tuple([z.number(), z.number()]).output— a Standard Schema that validates the return value (unwrapped from Promise), e.g.z.number()forPromise<number>.Both are optional — you can validate only inputs, only outputs, or both.