diff --git a/apps/identity.json b/apps/identity.json index 3e735005..91328bcb 100644 --- a/apps/identity.json +++ b/apps/identity.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🪪", - "previous": "&BOmGofChv5mvgZq61xy5mSS0fshtttcG68uL1ILu+qo=.sha256" + "previous": "&kgukkyDk1RxgfzgMH6H/0QeDPIuwPZypLuAFax21ljk=.sha256" } \ No newline at end of file diff --git a/apps/identity/app.js b/apps/identity/app.js index 51d214b3..3e24026a 100644 --- a/apps/identity/app.js +++ b/apps/identity/app.js @@ -3,48 +3,85 @@ 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(); await app.setDocument(`
+