@sigstore/tuf
Client for the Sigstore TUF repository
Last updated a year ago by bdehamer .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install @sigstore/tuf 
SYNC missed versions from official npm registry.

@sigstore/tuf ยท npm version CI Status Smoke Test Status

A JavaScript library for securely retrieving targets from the Sigstore TUF repository.

Features

  • Embeds the trutsted root metadata file necessary to bootstrap interaction with the Sigstore TUF repository.
  • Automatically initializes the local TUF cache for storing metadata and target files.

Prerequisites

  • Node.js version >= 14.17.0

Installation

npm install @sigstore/tuf

Usage

const { initTUF } = require('@sigstore/tuf');
import { initTUF } from '@sigstore/tuf';

initTUF([options])

Returns a TUF client which can be used to retrieve any target from the Sigstore TUF repository. The local TUF cache will be initialized and the TUF metadata files downloaded from the remote repository as part of the initialization process.

  • options <Object>
    • mirrorURL <string>: Base URL for the Sigstore TUF repository. Defaults to 'https://tuf-repo-cdn.sigstore.dev'
    • 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.
    • rootPath <string>: Path to the initial trust root for the TUF repository. Defaults to the embedded root.
    • force boolean: Force re-initialization of the TUF cache even if it already exists. Defaults to false.

The TUF client object returned from initTUF has a single getTarget function which takes the name of a target in the Sigstore TUF repository and returns the content of that target.

getTrustedRoot([options])

Retrieves the most recent version of the "trusted_root.json" target from the Sigstore TUF repository. The format of "trusted_root.json" file is described by the TrustedRoot protobuf and contains the complete set of trusted verification materials for the Sigstore public-good instance.

  • options <Object>
    • mirrorURL <string>: Base URL for the Sigstore TUF repository. Defaults to 'https://tuf-repo-cdn.sigstore.dev'
    • 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.
    • rootPath <string>: Path to the initial trust root for the TUF repository. Defaults to the embedded root.
    • force boolean: Force re-initialization of the TUF cache even if it already exists. Defaults to false.

Current Tags

  • 2.2.0                                ...           latest (a year ago)

7 Versions

  • 2.2.0                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (3)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |