2022-01-30 16:44:27 -05:00
|
|
|
# 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
|
2022-01-31 20:47:18 -05:00
|
|
|
- `CREATE TABLE identities (user TEXT, public TEXT, secret TEXT);`
|
2022-01-30 16:44:27 -05:00
|
|
|
|
|
|
|
## API
|
|
|
|
- `ssb.createIdentity()` -> `id`
|
|
|
|
- `ssb.getIdentities()` => `[id, ...]`
|
|
|
|
- `ssb.deleteIdentity(id)`
|
|
|
|
- `ssb.post(id, ...)`
|
|
|
|
- `ssb.appendMessage(id, ...)`
|