# sigstore · [![npm version](https://img.shields.io/npm/v/sigstore.svg?style=flat)](https://www.npmjs.com/package/sigstore) [![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)
A JavaScript library for generating and verifying Sigstore signatures. One of
the intended uses is to sign and verify npm packages but it can be used to sign
and verify any file.
## Features
- Support for signing using an OpenID Connect identity
- Support for publishing signatures to a [Rekor][1] instance
- Support for verifying Sigstore bundles
## Prerequisites
- Node.js version >= 16.14.0
## Installation
```
npm install sigstore
```
## Compatibility
The following table documents which combinations of Sigstore bundle versions
and Rekor types can be verified by different versions of the `sigstore`
library. It also lists which `sigstore` versions were shipped with different
`npm` CLI versions.
sigstore
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
npm
9.5.0
9.6.2
9.6.3
9.6.5
9.6.6
9.6.7
9.7.2
9.8.0
Bundle Version
Rekor Type
0.1
hashedrekord
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
intoto
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
dsse
:x:
:x:
:x:
:x:
:x:
:x:
:white_check_mark:
:white_check_mark:
:white_check_mark:
0.2
hashedrekord
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
intoto
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
:white_check_mark:
dsse
:x:
:x:
:x:
:x:
:x:
:x:
:white_check_mark:
:white_check_mark:
:white_check_mark:
## Usage
```javascript
const { attest, verify } = require('sigstore');
```
```javascript
import { attest, verify } from 'sigstore';
```
### sign(payload[, options])
Generates a Sigstore signature for the supplied payload. Returns a
[Sigstore bundle][2] containing the signature and the verification material
necessary to verify the signature.
- `payload` ``: The bytes of the artifact to be signed.
- `options` `