Skip to content

Commit

Permalink
Update readme, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Salmandabbakuti committed Sep 5, 2024
1 parent 48dc5d4 commit b1dbc56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SuperJWT

![npm version](https://img.shields.io/badge/npm-0.2.0-brightgreen)
![npm version](https://img.shields.io/badge/npm-0.2.1-brightgreen)

Super-JWT is a Node.js package that helps authenticate users based on Superfluid streams using JSON Web Tokens (JWT).

Expand Down Expand Up @@ -36,15 +36,15 @@ An object that represents the required parameters for authenticating a Superflui

`token`: A string that represents the ethereum address of the SuperToken being used.

In addition to the required parameters mentioned earlier, you can also pass any of the `where` parameters of the Superfluid subgraph `streams` query. This allows you to filter streams based on other properties such as `currentFlowRate_gt`, which is the flow rate in the stream. For more information on the available query parameters, you can refer to the [Superfluid subgraph documentation](https://thegraph.com/hosted-service/subgraph/superfluid-finance/protocol-v1-goerli).
In addition to the required parameters mentioned earlier, you can also pass any of the `where` parameters of the Superfluid subgraph `streams` query. This allows you to filter streams based on other properties such as `currentFlowRate_gt`, which is the flow rate in the stream. For more information on the available query parameters, you can refer to the [Superfluid subgraph documentation](https://console.superfluid.finance/subgraph).

#### Example

```javascript
import { authenticateWithStream } from "super-jwt";

const streamPayload = {
chain: "goerli",
chain: "sepolia",
sender: "0x123456789",
receiver: "0x987654321",
token: "0x0123456789abcdef",
Expand Down Expand Up @@ -85,9 +85,9 @@ const decoded = verifyToken(jwtToken, secret);
console.log(decoded);
// expected output: prints the decoded JWT Stream payload
// {
// chain: 'goerli',
// chain: 'sepolia',
// sender: '0xc7203561ef179333005a9b81215092413ab86ae9',
// receiver: '0x7348943c8d263ea253c0541656c36b88becd77b9',
// receiver: '0xdc7c5b449d4417a5aa01bf53ad280b1bedf4b078',
// token: '0xf2d68898557ccb2cf4c10c3ef2b034b2a69dad00',
// iat: 1680752577,
// }
Expand Down Expand Up @@ -150,4 +150,4 @@ I do not give any warranties and will not be liable for any loss incurred throug

# License

This package is licensed under the MIT License.
This package is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "super-jwt",
"version": "0.2.0",
"version": "0.2.1",
"description": "Super-JWT helps to authenticate your users based on Superfluid streams using JSON Web Tokens (JWT)",
"author": "Salman Dabbakuti",
"license": "MIT",
Expand Down

0 comments on commit b1dbc56

Please sign in to comment.