-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: hayleycd <[email protected]>
- Loading branch information
Showing
1 changed file
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ title: JavaScript Client Overview | |
weight: 5 | ||
--- | ||
|
||
[sigstore-js](https://github.com/sigstore/sigstore-js) is a collection of [javascript libraries](#additional-packages) for interacting with Sigstore. | ||
[sigstore-js](https://github.com/sigstore/sigstore-js) is a collection of [javascript libraries](#additional-packages) for interacting with Sigstore. | ||
|
||
The main package,[`sigstore`](https://www.npmjs.com/package/sigstore), is 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. | ||
|
||
|
@@ -19,7 +19,7 @@ Full project documentation can be found in the [sigstore-js](https://github.com/ | |
|
||
## Installation | ||
|
||
[`sigstore`](https://www.npmjs.com/package/sigstore) requires Node.js version >= 18.17.0. | ||
[`sigstore`](https://www.npmjs.com/package/sigstore) requires Node.js version >= 18.17.0. | ||
|
||
To install `sigstore` run the following command: | ||
|
||
|
@@ -28,6 +28,7 @@ npm install sigstore | |
``` | ||
|
||
## Example | ||
|
||
Check failure on line 31 in content/en/language_clients/javascript/overview.md GitHub Actions / markdownlintTrailing spaces
|
||
To use `sigstore`, import the following into your project using the following: | ||
|
||
```console | ||
|
@@ -38,7 +39,7 @@ npm install sigstore | |
import { sign, verify } from 'sigstore'; | ||
``` | ||
|
||
### Sign | ||
### Sign | ||
|
||
The following function will sign the file `foo.txt`: | ||
|
||
|
@@ -48,7 +49,7 @@ npm install sigstore | |
|
||
There are a number of optional arguments that can be used with the sign function. Additional information is available in the [project repository](https://github.com/sigstore/sigstore-js/tree/main/packages/client#signpayload-options). | ||
|
||
The sign function will return a Sigstore bundle (`foo.txt.sigstore.json`) which includes the signature and the necessary verification material. | ||
The sign function will return a Sigstore bundle (`foo.txt.sigstore.json`) which includes the signature and the necessary verification material. | ||
|
||
### Verify | ||
|
||
|
@@ -60,11 +61,11 @@ verify('foo.txt.sigstore.json', payload='foo.txt', certificateIssuer='odicIssuer | |
|
||
## Additional Packages | ||
|
||
The [sigstore-js](https://github.com/sigstore/sigstore-js) project includes additional functionality through its scoped packages. | ||
The [sigstore-js](https://github.com/sigstore/sigstore-js) project includes additional functionality through its scoped packages. | ||
|
||
- [`@sigstore/bundle`](https://www.npmjs.com/package/@sigstore/bundle) - TypeScript types and utility functions for working with Sigstore bundles. | ||
- [`@sigstore/cli`](https://www.npmjs.com/package/@sigstore/cli) - Command line interface for signing/verifying artifacts with Sigstore. | ||
- [`@sigstore/sign`](https://www.npmjs.com/package/@sigstore/sign) - Library for generating Sigstore signatures. | ||
- [`@sigstore/tuf`](https://www.npmjs.com/package/@sigstore/tuf) - Library for interacting with the Sigstore TUF repository. | ||
- [`@sigstore/rekor-types`](https://www.npmjs.com/package/@sigstore/rekor-types) - TypeScript types for the Sigstore Rekor REST API. | ||
- [`@sigstore/mock`](https://www.npmjs.com/package/@sigstore/mock) - Mocking library for Sigstore services. | ||
- [`@sigstore/mock`](https://www.npmjs.com/package/@sigstore/mock) - Mocking library for Sigstore services. |