@znode/sign
Version:
signature algorithm
26 lines (25 loc) • 480 B
TypeScript
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;