{"_id":"@sigstore/tuf@5.0.1","bugs":{"url":"https://github.com/sigstore/sigstore-js/issues"},"dist":{"shasum":"a50f0ed4df306f1241df6b5dea0a9ac8f6121ffc","tarball":"http://registry-npm.ywwl.com/@sigstore/tuf/download/@sigstore/tuf-5.0.1.tgz","fileCount":14,"integrity":"sha512-ofwYu9iXeMm85zPh0cauUXzXtIFNfHI1o9Ux1e0Eil6shsbx+8bAe58fhiU1FcHdOIxOkyDhZzD6Gu6uPnzoUg==","signatures":[{"sig":"MEYCIQD6r3QfB1Qy8sH1l+upqbD4UOsImUa2IV8N9kFyjq0oaQIhAIIlULsFziaFn4lWL6SlbIO55EWWcu1fHv3MLuKLT4yu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFfduez85F65tR0lqHBrltuAlIo2t+kTW3bmF/BNdfjCAiB0mH0gLy1K9O7CgKk5Hrg/4gYi38oen2aXeXbXrhckbQ=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@sigstore%2ftuf@5.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49026,"size":18123,"noattachment":false,"key":"/@sigstore/tuf/-/@sigstore/tuf-5.0.1.tgz"},"main":"dist/index.js","name":"@sigstore/tuf","types":"dist/index.d.ts","author":{"name":"bdehamer@github.com"},"engines":{"node":"^22.22.2 || ^24.15.0 || >=26.0.0"},"gitHead":"4576519f81b93bf96bd7457fc7252b8cfa11e67f","license":"Apache-2.0","scripts":{"test":"jest","build":"tsc --build","clean":"shx rm -rf dist *.tsbuildinfo"},"version":"5.0.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"e25c47bb-9288-408b-af93-254e27a1cbc8"}},"homepage":"https://github.com/sigstore/sigstore-js/tree/main/packages/tuf#readme","repository":{"url":"git+https://github.com/sigstore/sigstore-js.git","type":"git"},"_npmVersion":"11.19.1","description":"Client for the Sigstore TUF repository","directories":{},"maintainers":[{"name":"bdehamer","email":"brian@dehamer.com"}],"_nodeVersion":"24.22.1","dependencies":{"tuf-js":"^6.0.2","@sigstore/protobuf-specs":"^0.5.2"},"publishConfig":{"provenance":true},"_hasShrinkwrap":false,"devDependencies":{"@sigstore/jest":"^0.0.0","@tufjs/repo-mock":"^5.0.2","@types/make-fetch-happen":"^10.0.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tuf_5.0.1_1793837952869_0.14629686225303673"},"readme":"# @sigstore/tuf &middot; [![npm version](https://img.shields.io/npm/v/@sigstore/tuf.svg?style=flat)](https://www.npmjs.com/package/@sigstore/tuf) [![CI Status](https://github.com/sigstore/sigstore-js/workflows/CI/badge.svg)](https://github.com/sigstore/sigstore-js/actions/workflows/ci.yml) [![Smoke Test Status](https://github.com/sigstore/sigstore-js/workflows/smoke-test/badge.svg)](https://github.com/sigstore/sigstore-js/actions/workflows/smoke-test.yml)\n\nA JavaScript library for securely retrieving targets from the Sigstore [TUF][1]\nrepository.\n\n## Features\n\n- Embeds the trutsted root metadata file necessary to bootstrap interaction\n  with the Sigstore TUF repository.\n- Automatically initializes the local TUF cache for storing metadata and\n  target files.\n\n## Prerequisites\n\n- Node.js version ^22.22.2 || ^24.15.0 || >=26.0.0\n\n## Installation\n\n```\nnpm install @sigstore/tuf\n```\n\n## Usage\n\n```javascript\nconst { initTUF } = require('@sigstore/tuf');\n```\n\n```javascript\nimport { initTUF } from '@sigstore/tuf';\n```\n\n### initTUF([options])\n\nReturns a TUF client which can be used to retrieve any target from the Sigstore\nTUF repository. The local TUF cache will be initialized and the TUF metadata\nfiles downloaded from the [remote repository][2] as part of the initialization\nprocess.\n\n- `options` `<Object>`\n  - `mirrorURL` `<string>`: Base URL for the Sigstore TUF repository. Defaults to `'https://tuf-repo-cdn.sigstore.dev'`\n  - `cachePath` `<string>`: Absolute path to the directory to be used for caching downloaded TUF metadata and targets. Defaults to a directory named \"sigstore-js\" within the platform-specific application data directory.\n  - `rootPath` `<string>`: Path to the initial trust root for the TUF repository. Defaults to the [embedded root](./store/public-good-instance-root.json).\n  - `forceInit` `boolean`: Force re-initialization of the TUF cache even if it already exists. Defaults to `false`.\n  - `forceCache` `boolean`: Prevents any downloads from the remote TUF repository as long as all cached metadata files are un-expired. Defaults to `false`.\n  - `force` `boolean`: Same as `forceInit` (deprecated).\n\nThe `TUF` client object returned from `initTUF` has a single `getTarget`\nfunction which takes the name of a target in the Sigstore TUF repository\nand returns the content of that target.\n\n### getTrustedRoot([options])\n\nRetrieves the most recent version of the \"trusted_root.json\" target from the\nSigstore TUF repository. The format of \"trusted_root.json\" file is described\nby the [TrustedRoot][3] protobuf and contains the complete set of trusted\nverification materials for the Sigstore public-good instance.\n\n- `options` `<Object>`\n  - `mirrorURL` `<string>`: Base URL for the Sigstore TUF repository. Defaults to `'https://tuf-repo-cdn.sigstore.dev'`\n  - `cachePath` `<string>`: Absolute path to the directory to be used for caching downloaded TUF metadata and targets. Defaults to a directory named \"sigstore-js\" within the platform-specific application data directory.\n  - `rootPath` `<string>`: Path to the initial trust root for the TUF repository. Defaults to the [embedded root](./store/public-good-instance-root.json).\n  - `forceInit` `boolean`: Force re-initialization of the TUF cache even if it already exists. Defaults to `false`.\n  - `forceCache` `boolean`: Prevents any downloads from the remote TUF repository as long as all cached metadata files are un-expired. Defaults to `false`.\n  - `force` `boolean`: Same as `forceInit` (deprecated).\n\n[1]: https://theupdateframework.io/\n[2]: https://sigstore-tuf-root.storage.googleapis.com/\n[3]: https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_trustroot.proto\n","publish_time":1793837952954,"_cnpm_publish_time":1793837952954,"dist-tags":{"latest":"5.0.1"}}