# partypass

> > node.js privateparty client

Latest version **0.0.2** (published 2022-07-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install partypass
pnpm add partypass
yarn add partypass
bun add partypass
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-07-24 |
| First published | 2022-07-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 498.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | skogard |

## Links

- npm: https://www.npmjs.com/package/partypass
- npm.io page: https://npm.io/package/partypass

## Dependencies (3)

- [cross-fetch](https://npm.io/package/cross-fetch.md) ^3.1.5
- [@ethereumjs/util](https://npm.io/package/@ethereumjs/util.md) ^8.0.0-beta.1
- [@metamask/eth-sig-util](https://npm.io/package/@metamask/eth-sig-util.md) ^4.0.1

## Recent versions

- 0.0.2 (latest) — 2022-07-24
- 0.0.1 — 2022-07-24

## README

# Partypass

> node.js privateparty client

Full documentation at https://partypass.privateparty.dev

# Use cases

For anything that happens inside a browser you can use [privatepartyjs](https://privateparty.papercorp.org/docs/#/?id=_1-client).

For everything else, whre you have full access to the private key, you can use partypass.

- Embedded in mobile
- IoT
- Server side

# Install

```
npm install partypass
```

and require it:

```javascript
const Partypass = require('partypass')
```

or

```javascript
import Partypass from 'partypass'
```


# Usage

## 1. basic

```javascript
const pass = new Partypass({
  host: "http://localhost:3000",
  key: privKey
})
let session = await pass.create("user")
console.log(session)  // session includes 'account', 'expiresIn', and 'jwt'
```

## 2. build and request

You can build a request and make the actual JWT creation separately:

```javascript
const pass = new Partypass({
  host: "http://localhost:3000",
  key: privKey
})
let built = await pass.build("user")      // build a pass request object
let session = await pass.request(built)   // make an actual request and get the jwt
console.log(session)  // session includes 'account', 'expiresIn', and 'jwt'
```

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