tildefriends/apps/cory/docs/id_refactor.md

17 lines
430 B
Markdown
Raw Normal View History

# ID Refactor
[Back to index](#index)
## Goals
- no way to get private key in javascript
- ssb.c syncs/broadcasts/... efficiently for everybody
## Schema
- separate table to discourage leakage
- `CREATE TABLE identities (user TEXT, public TEXT, secret TEXT);`
## API
- `ssb.createIdentity()` -> `id`
- `ssb.getIdentities()` => `[id, ...]`
- `ssb.deleteIdentity(id)`
- `ssb.post(id, ...)`
- `ssb.appendMessage(id, ...)`