import * as tfrpc from '/tfrpc.js'; tfrpc.register(async function get_private_key(id) { return bip39Words(await ssb.getPrivateKey(id)); }); tfrpc.register(async function create_id(id) { return await ssb.createIdentity(); }); tfrpc.register(async function add_id(id) { return await ssb.addIdentity(bip39Bytes(id)); }); tfrpc.register(async function delete_id(id) { return await ssb.deleteIdentity(id); }); tfrpc.register(async function reload() { await main(); }); async function main() { let ids = await ssb.getIdentities(); let server_id = await ssb.getServerIdentity(); await app.setDocument( `

SSB Identity Management

Create a new identity

Import an SSB Identity from 12 BIP39 English Words

Identities

` ); } main();