{"name":"@sigstore/tuf","version":"2.0.0","description":"Client for the Sigstore TUF repository","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"clean":"shx rm -rf dist *.tsbuildinfo","build":"tsc --build","test":"jest"},"author":{"name":"bdehamer@github.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/sigstore/sigstore-js.git"},"bugs":{"url":"https://github.com/sigstore/sigstore-js/issues"},"homepage":"https://github.com/sigstore/sigstore-js/tree/main/packages/tuf#readme","publishConfig":{"provenance":true},"devDependencies":{"@sigstore/jest":"^0.0.0","@tufjs/repo-mock":"^2.0.0","@types/make-fetch-happen":"^10.0.0"},"dependencies":{"@sigstore/protobuf-specs":"^0.2.1","tuf-js":"^2.0.0"},"engines":{"node":"^16.14.0 || >=18.0.0"},"_id":"@sigstore/tuf@2.0.0","gitHead":"f0b49a04e5a62250e0f60fb128004a73110fe311","_nodeVersion":"16.20.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-Ow/ZMFH9kdHbMNOH//rDuINblqufpqD+e3xS9JY5RRce+euh9eUsjSc6jodioMMi2roN9rSAk8LCuyW2hngAKw==","shasum":"e459ec51bd5c01319b7e2f66ddfe446d42964a56","tarball":"http://registry-npm.ywwl.com/@sigstore/tuf/download/@sigstore/tuf-2.0.0.tgz","fileCount":14,"unpackedSize":32080,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@sigstore%2ftuf@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2tH7py3ffYe5TI+fHPdFZ6MG4WUfigh9Z0BDDoYZ1HAiAnO0p+k/5fWeJJMQT6nxkEJ5wwBvS9rpiYuPSSmF6XHA=="}],"size":10085,"noattachment":false,"key":"/@sigstore/tuf/-/@sigstore/tuf-2.0.0.tgz"},"_npmUser":{"name":"bdehamer","email":"brian@dehamer.com"},"directories":{},"maintainers":[{"name":"bdehamer","email":"brian@dehamer.com"},{"name":"mylesborins","email":"myles.borins@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tuf_2.0.0_1692374736026_0.26284016174182856"},"_hasShrinkwrap":false,"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 >= 16.14.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":1692374736195,"_cnpm_publish_time":1692374736195,"dist-tags":{"latest":"5.0.1"}}