# ssb-contact

> utilities for dealing with ssb contact messages

Latest version **1.0.0** (published 2017-04-21) · Fair license · 0 weekly downloads

## Install

```sh
npm install ssb-contact
pnpm add ssb-contact
yarn add ssb-contact
bun add ssb-contact
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-04-21 |
| First published | 2017-04-21 |
| Weekly downloads | 0 |
| License | Fair |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | cel |
| Maintainers | cel |

## Links

- npm: https://www.npmjs.com/package/ssb-contact
- Repository: ssb://%Tg6Q4N+KflNwJgwsmzYzpB4FpZPDx0E/kvfkXMbtpGQ=.sha256
- Homepage: https://git.scuttlebot.io/%25Tg6Q4N%2BKflNwJgwsmzYzpB4FpZPDx0E%2FkvfkXMbtpGQ%3D.sha256
- npm.io page: https://npm.io/package/ssb-contact

## Dependencies (3)

- [pull-many](https://npm.io/package/pull-many.md) ^1.0.8
- [pull-defer](https://npm.io/package/pull-defer.md) ^0.2.2
- [pull-stream](https://npm.io/package/pull-stream.md) ^3.5.0

## Recent versions

- 1.0.0 (latest) — 2017-04-21

## README

# ssb-contact

Stuff having to do with "contact" messages in Secure Scuttlebutt.

## API

```js
var Contacts = require('ssb-contact')
var contacts = new Contacts(sbot)
```

### contacts.createFollowsStream(id): source

Get a stream of ids of feeds that the given id follows

### contacts.createFollowersStream(id): source

Get a stream of ids of feeds that follow the given id

### contacts.createFriendsStream(id[, endCb]): source

Get a stream of ids of feeds that have a bidirectional follow with the given
id. Optionally, get the remaining relevant ids in a callback.

- **endCb**: `function (err, extra)` called when the stream is ended
- **extra.followers**: array of follower ids that are not friends
- **extra.follows**: array of followed ids that are not friends

### contacts.createContactStreams(id): object

Get streams of ids that follow the given id, or are followed by it, or both

```js
{
  friends: source,
  follows: source,
  followers: source,
}
```

- **friends**: stream of ids of feeds that the given id follows and they follow
    back
- **follows**: stream of ids of feeds that the given id follows but who do not
    follow it back
- **followers**: stream of ids of feeds that follow the given id while it does
    not follow them back

# Further resources

- https://scuttlebot.io/docs/message-types/contact.html

## License

Copyright (c) 2017 Secure Scuttlebutt Consortium

Usage of the works is permitted provided that this instrument
is retained with the works, so that any entity that uses the
works is notified of this instrument.

DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.

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