a demonstration replicated social networking web app built with anproto
wiredove.net/
social
ed25519
protocols
1import { h } from 'h'
2import { apds } from 'apds'
3
4export const importBlob = async () => {
5 const textarea = h('textarea', {placeholder: 'Import a bog5 message or blob'})
6
7 const button = h('button', {
8 onclick: async () => {
9 if (textarea.value) {
10 try {
11 const blob = await apds.make(textarea.value)
12 const msg = await apds.open(textarea.value)
13 window.location.hash = await apds.hash(textarea.value)
14 if (msg) {
15 await apds.add(textarea.value)
16 }
17 } catch (err) {
18 }
19 }
20 }
21 }, ['Import'])
22
23 return h('div', {classList: 'message'}, [
24 textarea,
25 button
26 ])
27}