Interface RpcMethodDef<A, R>

interface RpcMethodDef<
    A extends z.ZodTypeAny = z.ZodTypeAny,
    R extends z.ZodTypeAny = z.ZodTypeAny,
> {
    args: A;
    result: R;
    timeoutMessage?: string;
    timeoutMs?: null | number | (args: TypeOf<A>) => null | number;
}

Type Parameters

  • A extends z.ZodTypeAny = z.ZodTypeAny
  • R extends z.ZodTypeAny = z.ZodTypeAny

Properties

args: A
result: R
timeoutMessage?: string

User-facing message for the timeout error (shown by the UI).

timeoutMs?: null | number | (args: TypeOf<A>) => null | number

Client-side timeout. undefined/null = no timeout (long-running calls like waiting for a signature). A function computes the timeout from the call's arguments.