import * as tfrpc from '/tfrpc.js'; tfrpc.register(async function get_private_key(id) { return bip39Words(await ssb.getPrivateKey(id)); }); tfrpc.register(async function add_id(id) { return await ssb.addIdentity(bip39Bytes(id)); }); async function main() { let ids = await ssb.getIdentities(); await app.setDocument(` `+ ids.map(id => `
`).join('\n')+ ``); } main();