@kagamidigital/salt-sdk-mirror
    Preparing search index...

    Class InvalidTypedData

    Thrown when EIP-712 typed data passed to Salt.signTypedData is not a well-formed payload — a missing domain/types/message object, a primaryType that names no struct in types, or a struct definition that is not a list of { name, type } fields.

    The constructor inspects the payload and records the offending field names on InvalidTypedData.invalidFields, so consumers can surface a precise reason without re-validating it themselves. The payload as supplied is preserved on InvalidTypedData.typedData for debugging.

    try {
    await salt.signTypedData({ accountId, signer, typedData });
    } catch (err) {
    if (err instanceof InvalidTypedData) {
    console.error(`Bad typed data fields: ${err.invalidFields.join(', ')}`);
    }
    }

    Hierarchy

    • Error
      • InvalidTypedData
    Index

    Constructors

    Properties

    invalidFields: TypedDataField[]

    Names of the typed-data fields that were missing or malformed.

    message: string
    name: string
    stack?: string
    typedData: unknown

    The typed data as supplied by the caller.