UNPKG

@znode/sign

Version:
26 lines (25 loc) 480 B
export interface IData { /** * api method */ method: string; /** * api path */ path: string; /** * api query */ query?: object; body?: object; /** * ms */ timestamp: number; } export declare function sign(data: IData, secret: string): string; export declare function signWs(timestamp: number, secret: string): string; declare const _sign: typeof sign & { ws?: typeof signWs; }; export default _sign;