Skip to content

Commit

Permalink
Update readme and deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Powersource committed Oct 20, 2023
1 parent e0f8e67 commit 45c5779
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 14 deletions.
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@ const config = require('ssb-config')
const caps = require('ssb-caps')

const stack = SecretStack({ caps })
.use(require('ssb-db')) // << required
.use(require('ssb-backlinks')) // << required index
.use(require('ssb-query')) // << required index
.use(require('ssb-tribes'))
.use(require('ssb-private1')) // if you want to support old decryption
// *order matters*, load tribes first
.use(require('ssb-db2/core'))
.use(require('ssb-classic'))
.use(require('ssb-db2/compat'))
.use(require('ssb-db2/compat/feedstate'))
.use(require('ssb-box2'))
.use(...)

const ssb = stack(config)
const ssb = stack({
...config,
box2: {
...config.box2,
legacyMode: true
}
})
```


Expand Down Expand Up @@ -78,12 +83,16 @@ This plugin provides functions for creating groups and administering things abou
## Requirements

A Secret-Stack server running the plugins:
- `ssb-db` >= 20.3.0
- `ssb-db2/core` >= 7.1.1
- `ssb-classic`
- `ssb-tribes`
- `ssb-backlinks` >= 2.1.1 - used for adding group tangle meta data to messages
- `ssb-query` >= 2.4.5 - used for listing groups linked to your feedId, or subgroup linked to groups
- `ssb-db2/compat`
- `ssb-db2/compat/feedstate`
- `ssb-box2` >= TODO
- `ssb-replicate` - (optional) used to auto-replicate people who you're in groups with

The secret stack option `config.box2.legacyMode` also needs to be `true`.

## API

### `ssb.tribes.create(opts, cb)`
Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ module.exports = {
}

function init (ssb, config) {

if (!(config.box2 && config.box2.legacyMode)) throw Error("ssb-tribes error: config.box2.legacyMode needs to be `true`")

const state = {
keys: ssb.keys,
feedId: bfe.encode(ssb.id),
Expand Down
15 changes: 12 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"pull-stream": "^3.7.0",
"sodium-native": "^3.4.1",
"ssb-bfe": "^3.7.0",
"ssb-box2": "ssbc/ssb-box2#pobox",
"ssb-crut": "^5.1.0",
"ssb-keys": "^8.5.0",
"ssb-private-group-keys": "^0.4.1",
Expand All @@ -50,6 +49,8 @@
"is-canonical-base64": "^1.1.1",
"scuttle-testbot": "^2.1.0",
"ssb-backlinks": "^2.1.1",
"ssb-box2": "ssbc/ssb-box2#pobox",
"ssb-db2": "^7.1.1",
"ssb-query": "^2.4.5",
"ssb-replicate": "^1.3.3",
"standard": "^17.1.0",
Expand Down

0 comments on commit 45c5779

Please sign in to comment.