UNPKG

koishi-plugin-yunzai

Version:
35 lines (34 loc) 917 B
export interface Cookie { [K: string]: string | number; } export declare class Hoyo { private region; private device; private conf; constructor(uid: `${number}`); get act_id(): string; /** * 获取新版ds内容 * @param body * @param params * @returns */ newDS(body?: Record<string, any>, params?: Record<string, any>): string; /** * 旧版本ds内容,主要用于签到 */ oldDS(salt?: string): string; private hash; headers(cookie: string, query?: Record<string, any>, body?: Record<string, any>): Record<string, string | number | boolean>; signHeader(cookie: string): Record<string, string | number | boolean>; /** * format cookie to object * @param cookie */ static parseCookie(cookie: string): Cookie; /** * * @param cookie */ static vertifyCookie(cookie: string): boolean; }