anproto personal data server
1import { apds } from './apds.js'
2import { profile } from './profile.js'
3import { composer } from './composer.js'
4import { render } from './render.js'
5
6await apds.start('apds1')
7
8if (!await apds.pubkey()) {
9 const keypair = await apds.generate()
10 console.log(keypair)
11 await apds.put('keypair', keypair)
12}
13
14document.body.appendChild(await profile())
15document.body.appendChild(await composer())
16
17const scroller = document.createElement('div')
18scroller.id = 'scroller'
19
20document.body.appendChild(scroller)
21
22const log = await apds.query()
23
24log.forEach(async (obj) => {
25 await render.hash(obj.hash, scroller)
26})