UNPKG

@jinyexin/wechat

Version:

A simple wechat server lib

24 lines (23 loc) 1.17 kB
/// <reference types="node" /> /** * Created by enixjin on 4/12/17. */ import { RequestOptions } from "https"; export declare namespace wechatUtils { function checkWechatSignature(signature: any, timestamp: any, nonce: any, token: any): boolean; function sign(jsapi_ticket: any, url: any): { nonceStr: string; timestamp: number; signature: any; }; function signObject(message: any): any; function getAccessToken(): Promise<string>; function getJSAPITicket(): Promise<string>; function getWebAccessToken(code: string): Promise<any>; function sendWechatRequest(options: RequestOptions, data: any, successCallback: (data: any) => void, failCallback: (err: any) => void, appendToken?: boolean): void; function sendHTTPRequest(options: RequestOptions, data: any, successCallback: (data: any) => void, failCallback: (err: any) => void, appendToken?: boolean): void; function createNonceStr(): string; function createTimestamp(): number; function raw(args: any, sort?: boolean, toLowerCase?: boolean): string; function checkLocalhost(req: any, res: any, next: any): void; }