Skip to content

Commit

Permalink
Addressing comments.
Browse files Browse the repository at this point in the history
Signed-off-by: hayleycd <[email protected]>
  • Loading branch information
hayleycd committed Nov 6, 2024
1 parent e959696 commit 97f80e2
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions content/en/language_clients/javascript/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,20 @@ npm install sigstore

### Signing example

The following function will sign the file `foo.txt`:

```console
sign('foo.txt');
```
const bundle = await sign(Buffer.from('hello world'));
```

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 JSON-encoded Sigstore bundle which includes the signature and the necessary verification material.

### Verifying example

The following function will verify the file `foo.txt`:
The following function will verify the previously signed message:

```console
verify('foo.txt.sigstore.json', payload='foo.txt', certificateIssuer='odicIssuerURL', certificateIdentityEmail='myEmail@example.com' )
verify(bundle, Buffer.from('hello world'), { certificateIssuer: 'https://token.actions.githubusercontent.com/' });
```

More information on optional arguments can be found in the [project documentation](https://github.com/sigstore/sigstore-js/tree/main/packages/client#verifybundle-payload-options)
Expand Down

0 comments on commit 97f80e2

Please sign in to comment.