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

    Class InvalidNudgePayload

    Thrown when a nudge payload received over the websocket cannot be used to start a keygen or signing ceremony because one or more required fields are missing or have an invalid value.

    The constructor inspects the payload and records the offending field names on InvalidNudgePayload.invalidFields, so consumers can surface a precise reason without having to re-validate the payload themselves. The original payload is preserved on InvalidNudgePayload.payload for debugging.

    nudgeListener.on('error', (err) => {
    if (err instanceof InvalidNudgePayload) {
    console.error(
    `Nudge missing fields: ${err.invalidFields.join(', ')}`,
    err.payload
    );
    }
    });

    Hierarchy

    • Error
      • InvalidNudgePayload
    Index

    Constructors

    Properties

    invalidFields: (keyof NudgePayload)[]

    Names of the fields on the nudge payload that were missing or invalid.

    message: string
    name: string
    payload: NudgePayload

    The raw nudge payload that failed validation.

    stack?: string