Type alias _TypedDataParametersToAbiParameters<TTypedDataParameters, TTypedData, TKeyReferences>

_TypedDataParametersToAbiParameters<TTypedDataParameters, TTypedData, TKeyReferences>: {
    [K in keyof TTypedDataParameters]: TTypedDataParameters[K] extends infer TTypedDataParameter extends {
            name: string;
            type: unknown;
        }
        ? TTypedDataParameter["type"] extends keyof TTypedData & string
            ? {
                components: TTypedDataParameter["type"] extends keyof TKeyReferences
                    ? Error<`Circular reference detected. '${TTypedDataParameter["type"]}' is a circular reference.`>
                    : _TypedDataParametersToAbiParameters<TTypedData[TTypedDataParameter["type"]], TTypedData, TKeyReferences & {
                        [_ in TTypedDataParameter["type"]]: true
                    }>;
                name: TTypedDataParameter["name"];
                type: "tuple";
            }
            : TTypedDataParameter["type"] extends `${infer TType extends keyof TTypedData & string}[${infer Tail}]`
                ? {
                    components: TType extends keyof TKeyReferences
                        ? Error<`Circular reference detected. '${TTypedDataParameter["type"]}' is a circular reference.`>
                        : _TypedDataParametersToAbiParameters<TTypedData[TType], TTypedData, TKeyReferences & {
                            [_ in TType]: true
                        }>;
                    name: TTypedDataParameter["name"];
                    type: `tuple[${Tail}]`;
                }
                : TTypedDataParameter
        : never
}

Type Parameters

  • TTypedDataParameters extends readonly TypedDataParameter[]

  • TTypedData extends TypedData

  • TKeyReferences extends {
        [_: string]: unknown;
    } | unknown = unknown

Generated using TypeDoc