# gpg-promised

> GPG async library

Latest version **0.4.12** (published 2020-02-27) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install gpg-promised
pnpm add gpg-promised
yarn add gpg-promised
bun add gpg-promised
```

## 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.4.12 |
| Published | 2020-02-27 |
| First published | 2019-12-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 58.4 KB |
| Known vulnerabilities | 0 (+5 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | RosHub Inc. |
| Maintainers | alanm, nickzat |

## Links

- npm: https://www.npmjs.com/package/gpg-promised
- Repository: https://github.com/datapartyjs/gpg-promised
- Homepage: https://github.com/datapartyjs/gpg-promised#readme
- Issues: https://github.com/datapartyjs/gpg-promised/issues
- npm.io page: https://npm.io/package/gpg-promised

## Dependencies (9)

- [tmp](https://npm.io/package/tmp.md) ^0.1.0
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [request](https://npm.io/package/request.md) ^2.88.0
- [@hapi/hoek](https://npm.io/package/@hapi/hoek.md) ^8.5.0
- [jsonpath-plus](https://npm.io/package/jsonpath-plus.md) ^3.0.0
- [transform-hoek](https://npm.io/package/transform-hoek.md) ^0.0.1
- [email-addresses](https://npm.io/package/email-addresses.md) ^3.1.0
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.5

## Recent versions

- 0.4.12 (latest) — 2020-02-27
- 0.4.11 — 2020-02-27
- 0.4.10 — 2020-02-27
- 0.4.9 — 2020-02-22
- 0.4.8 — 2020-02-22
- 0.4.7 — 2020-02-22
- 0.4.6 — 2020-02-22
- 0.4.5 — 2020-02-22
- 0.4.4 — 2020-02-22
- 0.4.3 — 2020-02-22
- 0.4.2 — 2020-02-20
- 0.4.1 — 2020-02-20
- 0.4.0 — 2020-02-19
- 0.3.0 — 2020-01-15
- 0.2.4 — 2019-12-16
- … 3 more at https://npm.io/package/gpg-promised/versions

## README

# gpg-promised

`The GPG interface for nodejs we were promised`

 * Examples - [examples/](https://github.com/datapartyjs/gpg-promised/tree/master/examples)
 * Documentation - [datapartyjs.github.io/gpg-promised/](https://datapartyjs.github.io/gpg-promised/)
 * NPM - [npmjs.com/package/gpg-promised](https://www.npmjs.com/package/gpg-promised)
 * Code - [github.com/datapartyjs/gpg-promised](https://github.com/datapartyjs/gpg-promised)
 * Social - [@datapartyjs](https://twitter.com/datapartyjs)

 ```js
  const GpgPromised = require('gpg-promised')
  const KeyChain = GpgPromised.KeyChain

  const keychain = new KeyChain()

  //! open keychain for operations
  await keychain.open()

  //! Make a connected security card the primary identity
  await keychain.trustCard()

  //! Download keys for reciepents
  for(const toEmail of toEmails){
    console.log('recvKey -', toEmail)
    const toKeyLookup = await keychain.lookupKey(toEmail)
    await keychain.recvKey(toKeyLookup.keyid)
  }
  
  const who = await keychain.whoami()
  console.log('whoami',who)

  const enc = await keychain.encrypt('hello world', who.concat(toEmails), who[0])
  console.log('encrypt -', enc)

  const dec = await keychain.decrypt(enc)
 ```

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