import * as tfrpc from '/tfrpc.js'; const is_admin = core.user?.credentials?.permissions?.administration; 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(); }); tfrpc.register(async function make_server(id) { return await ssb.swapWithServerIdentity(id); }); async function main() { let ids = await ssb.getIdentities(); let server_id = await ssb.getServerIdentity(); await app.setDocument( `