# ssb-about-self

> ssb-db2 plugin for about messages related to the author

Latest version **1.1.0** (published 2022-09-14) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install ssb-about-self
pnpm add ssb-about-self
yarn add ssb-about-self
bun add ssb-about-self
```

## 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.1.0 |
| Published | 2022-09-14 |
| First published | 2022-05-26 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 6 |
| Unpacked size | 22.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Andre Staltz |
| Maintainers | staltz |
| Keywords | ssb |

## Links

- npm: https://www.npmjs.com/package/ssb-about-self
- Repository: https://github.com/ssbc/ssb-about-self
- Homepage: https://github.com/ssbc/ssb-about-self#readme
- Issues: https://github.com/ssbc/ssb-about-self/issues
- npm.io page: https://npm.io/package/ssb-about-self

## Dependencies (6)

- [bipf](https://npm.io/package/bipf.md) ^1.6.3
- [pull-cat](https://npm.io/package/pull-cat.md) ^1.1.11
- [pull-async](https://npm.io/package/pull-async.md) ^1.0.0
- [pull-level](https://npm.io/package/pull-level.md) ^2.0.4
- [pull-stream](https://npm.io/package/pull-stream.md) ^3.6.14
- [clarify-error](https://npm.io/package/clarify-error.md) ^1.0.0

## Recent versions

- 1.1.0 (latest) — 2022-09-14
- 1.0.1 — 2022-05-26
- 1.0.0 — 2022-05-26

## README

<!--
SPDX-FileCopyrightText: 2021 Anders Rune Jensen

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

# ssb-about-self

> An SSB secret-stack plugin for _profile data_ using ssb-db2

## Install

```
npm install ssb-about-self
```

## Usage

- Requires **Node.js 12** or higher
- Requires `secret-stack@^6.2.0`
- Requires `ssb-db2@>=3.4.0`

```diff
 SecretStack({appKey: require('ssb-caps').shs})
   .use(require('ssb-master'))
+  .use(require('ssb-db2'))
+  .use(require('ssb-about-self'))
   .use(require('ssb-conn'))
   .use(require('ssb-blobs'))
   .call(null, config)
```

This plugin indexes only self-assigned about messages in contrast to
[ssb-social-index](https://github.com/ssbc/ssb-social-index) that indexes all
about messages.

Example usage:

```js
const SecretStack = require('secret-stack')
const caps = require('ssb-caps')

const ssb = SecretStack({ caps })
  .use(require('ssb-db2'))
  .use(require('ssb-db2/about-self')) // include index
  .call(null, { path: './' })

ssb.aboutSelf.get(ssb.id, (err, profile) => {
  console.log('My profile name is: ' + profile.name)
})
```

The **`profile`** object has the following fields:

- `name`: string
- `description`: string
- `image`: blob ID as a string

## API

## `ssb.aboutSelf.get(feedId, cb)` (muxrpc "async")

- `feedId`: the feedId to get the profile for
- `cb`: callback(err, profile)

Async API to get the latest self-assigned profile data for the given `feedId`.

## `ssb.aboutSelf.stream(feedId)` (muxrpc "source")

- `feedId`: the feedId to get the profile for

pull-stream "source" API to get the latest self-assigned profile data for the
given `feedId` followed by any live updates to that profile.

## License

LGPL-3.0

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