diff --git a/Readme.md b/Readme.md index 59f8dd1..fe68961 100644 --- a/Readme.md +++ b/Readme.md @@ -2,6 +2,7 @@ ![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. @@ -9,6 +10,8 @@ A Node.js port of the [privacypass Python module](https://github.com/SergeBakhar ```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: [ @@ -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 }); ``` - diff --git a/package-lock.json b/package-lock.json index ca048fc..9890d41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "privacy-pass-redeemer", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 88befc0..b8e99fe 100644 --- a/package.json +++ b/package.json @@ -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",