Function validateTransaction

  • Validates a given transaction against its' schema.

    Example

    import { validateTransaction } from '@klayr/transactions';
    const validation = validateTransaction(transaction, paramsSchema);

    Returns

    undefined, if the transaction is valid and no errors are found. Returns the Error, if any errors are discovered curing the validation.

    See

    Parameters

    • transactionObject: Record<string, unknown>

      The transaction to validate.

    • Optional paramsSchema: object

      The parameters schema for the transaction.

    Returns undefined | Error | KlayrValidationError

Generated using TypeDoc