HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/node_modules/@tufjs/models/dist/role.d.ts
import { JSONObject, JSONValue } from './utils';
export declare const TOP_LEVEL_ROLE_NAMES: string[];
export interface RoleOptions {
    keyIDs: string[];
    threshold: number;
    unrecognizedFields?: Record<string, JSONValue>;
}
/**
 * Container that defines which keys are required to sign roles metadata.
 *
 * Role defines how many keys are required to successfully sign the roles
 * metadata, and which keys are accepted.
 */
export declare class Role {
    readonly keyIDs: string[];
    readonly threshold: number;
    readonly unrecognizedFields?: Record<string, JSONValue>;
    constructor(options: RoleOptions);
    equals(other: Role): boolean;
    toJSON(): JSONObject;
    static fromJSON(data: JSONObject): Role;
}
interface DelegatedRoleOptions extends RoleOptions {
    name: string;
    terminating: boolean;
    paths?: string[];
    pathHashPrefixes?: string[];
}
/**
 * A container with information about a delegated role.
 *
 * A delegation can happen in two ways:
 *   - ``paths`` is set: delegates targets matching any path pattern in ``paths``
 *   - ``pathHashPrefixes`` is set: delegates targets whose target path hash
 *      starts with any of the prefixes in ``pathHashPrefixes``
 *
 *   ``paths`` and ``pathHashPrefixes`` are mutually exclusive: both cannot be
 *   set, at least one of them must be set.
 */
export declare class DelegatedRole extends Role {
    readonly name: string;
    readonly terminating: boolean;
    readonly paths?: string[];
    readonly pathHashPrefixes?: string[];
    constructor(opts: DelegatedRoleOptions);
    equals(other: DelegatedRole): boolean;
    isDelegatedPath(targetFilepath: string): boolean;
    toJSON(): JSONObject;
    static fromJSON(data: JSONObject): DelegatedRole;
}
interface SuccinctRolesOption extends RoleOptions {
    bitLength: number;
    namePrefix: string;
}
/**
 * Succinctly defines a hash bin delegation graph.
 *
 * A ``SuccinctRoles`` object describes a delegation graph that covers all
 * targets, distributing them uniformly over the delegated roles (i.e. bins)
 * in the graph.
 *
 * The total number of bins is 2 to the power of the passed ``bit_length``.
 *
 * Bin names are the concatenation of the passed ``name_prefix`` and a
 * zero-padded hex representation of the bin index separated by a hyphen.
 *
 * The passed ``keyids`` and ``threshold`` is used for each bin, and each bin
 * is 'terminating'.
 *
 * For details: https://github.com/theupdateframework/taps/blob/master/tap15.md
 */
export declare class SuccinctRoles extends Role {
    readonly bitLength: number;
    readonly namePrefix: string;
    readonly numberOfBins: number;
    readonly suffixLen: number;
    constructor(opts: SuccinctRolesOption);
    equals(other: SuccinctRoles): boolean;
    /***
     * Calculates the name of the delegated role responsible for 'target_filepath'.
     *
     * The target at path ''target_filepath' is assigned to a bin by casting
     * the left-most 'bit_length' of bits of the file path hash digest to
     * int, using it as bin index between 0 and '2**bit_length - 1'.
     *
     * Args:
     *  target_filepath: URL path to a target file, relative to a base
     *  targets URL.
     */
    getRoleForTarget(targetFilepath: string): string;
    getRoles(): Generator<string>;
    /***
     * Determines whether the given ``role_name`` is in one of
     * the delegated roles that ``SuccinctRoles`` represents.
     *
     * Args:
     *  role_name: The name of the role to check against.
     */
    isDelegatedRole(roleName: string): boolean;
    toJSON(): JSONObject;
    static fromJSON(data: JSONObject): SuccinctRoles;
}
export {};