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