import { DownloadOptions } from './models'; export declare const cache: Map; /** * Extract signature deciphering tokens from html5player file. * * @param {string} html5playerfile * @param {Object} options * @param {Function(!Error, Array.)} callback */ export declare const getTokens: (html5playerfile: string, options: DownloadOptions) => Promise; /** * Decipher a signature based on action tokens. * * @param {Array.} tokens * @param {string} sig * @return {string} */ export declare const decipher: (tokens: any, sig: any) => any; /** * Extracts the actions that should be taken to decipher a signature. * * This searches for a function that performs string manipulations on * the signature. We already know what the 3 possible changes to a signature * are in order to decipher it. There is * * * Reversing the string. * * Removing a number of characters from the beginning. * * Swapping the first character with another position. * * Note, `Array#slice()` used to be used instead of `Array#splice()`, * it's kept in case we encounter any older html5player files. * * After retrieving the function that does this, we can see what actions * it takes on a signature. * * @param {string} body * @return {Array.} */ export declare const extractActions: (body: any) => any[]; /** * @param {Object} format * @param {string} sig * @param {boolean} debug */ export declare const setDownloadURL: (format: any, sig: any, debug: any) => void; /** * Applies `sig.decipher()` to all format URL's. * * @param {Array.} formats * @param {Array.} tokens * @param {boolean} debug */ export declare const decipherFormats: (formats: any, tokens: any, debug: any) => void;