UNPKG

@znode/sign

Version:
22 lines (21 loc) 440 B
export interface IData { /** * api key */ apiKey: 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, key: string, secret: string): string; declare const _sign: typeof sign & { ws?: typeof signWs; }; export default _sign;