# jwt-lib-test

> > A cryptocurrency-compliant js library > 一个实现符合加密货币的js库 > > Based on jsontokens library (https://github.com/stacks-network/jsontokens-js). > 基于jsontokens库进行扩展。

Latest version **0.0.3** (published 2024-04-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install jwt-lib-test
pnpm add jwt-lib-test
yarn add jwt-lib-test
bun add jwt-lib-test
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2024-04-19 |
| First published | 2024-04-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 17.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | cc. |

## Links

- npm: https://www.npmjs.com/package/jwt-lib-test
- npm.io page: https://npm.io/package/jwt-lib-test

## Dependencies (3)

- [jsontokens](https://npm.io/package/jsontokens.md) ^4.0.1
- [@ethereumjs/util](https://npm.io/package/@ethereumjs/util.md) ^9.0.3
- [@ethereumjs/wallet](https://npm.io/package/@ethereumjs/wallet.md) ^2.0.3

## Recent versions

- 0.0.3 (latest) — 2024-04-19
- 0.0.2 — 2024-04-19
- 0.0.1 — 2024-04-19

## README

# jwt-lib

> A cryptocurrency-compliant js library
> 一个实现符合加密货币的js库
>
> Based on jsontokens library (https://github.com/stacks-network/jsontokens-js).
> 基于jsontokens库进行扩展。

## INSTALL

```shell
npm install jwt-lib-test
```

## Code demonstration

```bash
import walletJwt from "jwt-lib-test"

const wallet = walletJwt.generate();
console.log(wallet);
const data = {
  header:{
    time: new Date().toString(),
  },
  payload:{
    sub: '1234567890',
    name: 'John Doe',
  }
};
const sign = walletJwt.signOfjwt(data, wallet.privateKey);
console.log(sign);
console.log(walletJwt.decodeOfjwt(sign));
console.log(walletJwt.verifyOfjwt(sign, wallet.compressPubKey));
```

---
_Source: https://npm.io/package/jwt-lib-test · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
