/*! * @package @coolgk/utils * @version 3.1.4 * @link https://github.com/coolgk/node-utils * @license MIT * @author Daniel Gong * * Copyright (c) 2017 Daniel Gong . All rights reserved. * Licensed under the MIT License. */ /// /*! * Copyright (c) 2017 Daniel Gong . All rights reserved. * Licensed under the MIT License. */ import * as request from 'request'; export interface ICaptchaConfig { readonly request?: typeof request; readonly secret: string; } export interface IResult { success: boolean; [index: string]: any; } export declare class Captcha { static readonly _RECAPTCHA_URL: string; protected _secret: string; protected _request: typeof request; constructor(options: ICaptchaConfig); verify(response: string, remoteip?: string): Promise; } export declare function verify(secret: string, response: string, remoteip?: string): Promise; export default Captcha;