diff options
Diffstat (limited to 'deps/npm/node_modules/@tufjs/models/dist/delegations.d.ts')
-rw-r--r-- | deps/npm/node_modules/@tufjs/models/dist/delegations.d.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/deps/npm/node_modules/@tufjs/models/dist/delegations.d.ts b/deps/npm/node_modules/@tufjs/models/dist/delegations.d.ts new file mode 100644 index 0000000000..357e9dfeb8 --- /dev/null +++ b/deps/npm/node_modules/@tufjs/models/dist/delegations.d.ts @@ -0,0 +1,32 @@ +import { Key } from './key'; +import { DelegatedRole, SuccinctRoles } from './role'; +import { JSONObject, JSONValue } from './utils'; +type DelegatedRoleMap = Record<string, DelegatedRole>; +type KeyMap = Record<string, Key>; +interface DelegationsOptions { + keys: KeyMap; + roles?: DelegatedRoleMap; + succinctRoles?: SuccinctRoles; + unrecognizedFields?: Record<string, JSONValue>; +} +/** + * A container object storing information about all delegations. + * + * Targets roles that are trusted to provide signed metadata files + * describing targets with designated pathnames and/or further delegations. + */ +export declare class Delegations { + readonly keys: KeyMap; + readonly roles?: DelegatedRoleMap; + readonly unrecognizedFields?: Record<string, JSONValue>; + readonly succinctRoles?: SuccinctRoles; + constructor(options: DelegationsOptions); + equals(other: Delegations): boolean; + rolesForTarget(targetPath: string): Generator<{ + role: string; + terminating: boolean; + }>; + toJSON(): JSONObject; + static fromJSON(data: JSONObject): Delegations; +} +export {}; |