Skip to content

Commit

Permalink
Fix package main and typings
Browse files Browse the repository at this point in the history
  • Loading branch information
claabs committed Feb 27, 2022
1 parent c420380 commit 8ed3ced
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

![GitHub Workflow Status](https://img.shields.io/github/workflow/status/claabs/privacy-pass-redeemer-node/Unit%20test%20and%20build)
[![Coverage Status](https://coveralls.io/repos/github/claabs/privacy-pass-redeemer-node/badge.svg?branch=master)](https://coveralls.io/github/claabs/privacy-pass-redeemer-node?branch=master)
![npm](https://img.shields.io/npm/v/privacy-pass-redeemer)

A Node.js port of the [privacypass Python module](https://github.com/SergeBakharev/privacypass). See [its Readme](https://github.com/SergeBakharev/privacypass#readme) for more details on its background.

## Usage

```typescript
import axios from 'axios';
import { getRedemptionHeader, PrivacyPassToken } from 'privacy-pass-redeemer';

// 1. Obtain token from browser storage; pass into your program
const token: PrivacyPassToken = {
input: [
Expand Down Expand Up @@ -38,4 +41,3 @@ const redemptionTokenHeader = getRedemptionHeader(
// 3. Make a request with the redemtion token. The token is expired after use
const resp = await axios.get('https://example.com/some/path', { headers: redemptionTokenHeader });
```

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "privacy-pass-redeemer",
"version": "1.0.1",
"version": "1.0.2",
"description": "A Node.js module implementing the Privacy Pass protocol",
"main": "dist/index.js",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
"scripts": {
"test": "jest",
"test:ci": "jest --coverage",
Expand Down

0 comments on commit 8ed3ced

Please sign in to comment.