incubed
Version:
Typescript-version of the incubed client
33 lines (32 loc) • 1.51 kB
TypeScript
/***********************************************************
* This file is part of the Slock.it IoT Layer. *
* The Slock.it IoT Layer contains: *
* - USN (Universal Sharing Network) *
* - INCUBED (Trustless INcentivized remote Node Network) *
************************************************************
* Copyright (C) 2016 - 2018 Slock.it GmbH *
* All Rights Reserved. *
************************************************************
* You may use, distribute and modify this code under the *
* terms of the license contract you have concluded with *
* Slock.it GmbH. *
* For information about liability, maintenance etc. also *
* refer to the contract concluded with Slock.it GmbH. *
************************************************************
* For more information, please refer to http://slock.it *
* For questions, please contact info@slock.it *
***********************************************************/
import * as Ajv from 'ajv';
/**
* the ajv instance with custom formatters and keywords
*/
export declare const ajv: Ajv.Ajv;
/**
* validates the data and throws an error in case they are not valid.
*
* @export
* @param {Ajv.ValidateFunction} fn
* @param {any} ob
*/
export declare function validateAndThrow(fn: Ajv.ValidateFunction, ob: any): void;
export declare function validate(ob: any, def: any): void;