ssbc / ssb-db2

A new database for secure-scuttlebutt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how do I know if stack is ready?

mixmix opened this issue · comments

I think something missing in scuttlebutt is to start up secret-stack and then be like... ok is the stack and it's plugins "ready"?

at the moment I just hit ssb.whoami(cb) and this is a crude way to answer this question. I'm not sure if this API exisit on ssb-db2 ? I can't see it documented anywhere, and the compat plugins don't seem to mention anything....?)

This need to test for readiness is important for decryption (like with ssb-tribes). We need to know we've loaded all our keys into memory that we might be using. This is definitely a pattern looking for a home?...

That should be taken care of by https://github.com/ssb-ngi-pointer/ssb-db2-box2#setready. I would imagine that ssb-tribes would have a wrapper around that module and call setReady once it has added the needed keys.