# ssb-http-invite-client

> Secret-stack plugin to use HTTP invites as a client

Latest version **1.0.1** (published 2021-10-08) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install ssb-http-invite-client
pnpm add ssb-http-invite-client
yarn add ssb-http-invite-client
bun add ssb-http-invite-client
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-10-08 |
| First published | 2021-04-30 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 23.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Andre Staltz |
| Maintainers | staltz |

## Links

- npm: https://www.npmjs.com/package/ssb-http-invite-client
- Repository: https://github.com/ssb-ngi-pointer/ssb-http-invite-client
- Issues: https://github.com/ssb-ngi-pointer/ssb-http-invite-client/issues
- npm.io page: https://npm.io/package/ssb-http-invite-client

## Dependencies (3)

- [ssb-ref](https://npm.io/package/ssb-ref.md) ^2.14.3
- [@minireq/node](https://npm.io/package/@minireq/node.md) ^2.0.0
- [@minireq/browser](https://npm.io/package/@minireq/browser.md) ^2.0.0

## Recent versions

- 1.0.1 (latest) — 2021-10-08
- 1.0.0 — 2021-07-22
- 0.1.0 — 2021-04-30

## README

<!--
SPDX-FileCopyrightText: 2021 Andre Staltz

SPDX-License-Identifier: CC0-1.0
-->

# ssb-http-invite-client

Plugin that implements the client-side of the [SSB HTTP Invites spec](https://ssb-ngi-pointer.github.io/ssb-http-invite-spec). This is supposed to be installed and used on **apps** that make remote calls to servers, thus *clients*.

## Installation

**Prerequisites:**

- Node.js 6.5.0 or higher
- Requires `secret-stack@>=6.2.0`

```
npm install --save ssb-http-invite-client
```

Require and use the following plugin into your ssb-server or secret-stack setup:

```diff
 SecretStack({appKey: require('ssb-caps').shs})
   .use(require('ssb-master'))
   .use(require('ssb-logging'))
   .use(require('ssb-conn'))
   .use(require('ssb-replicate'))
   .use(require('ssb-ebt'))
+  .use(require('ssb-http-invite-client'))
   .use(require('ssb-friends'))
   .use(require('ssb-about'))
   .call(null, require('./config'));
```

## Usage

### `ssb.httpInviteClient.claim(uri, cb)`

* `uri` is a string, either an HTTP URL or an SSB URI:
    * `https://myroom.com/join?invite=123abc`
    * `ssb:experimental?action=join-room&invite=123abc&postTo=anotherUrl`
* `cb` is called with 2nd arg `multiserverAddress` (for the server) if succeeded

## License

LGPL-3.0

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