diff --git a/README.md b/README.md index cd063a6..946e401 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,32 @@ the **A**uthenticated and **N**on-networked protocol or **AN**other protocol +ed25519 keypairs sign timestamp + hash in base64 + +*** + (we wanted aproto, but the dot com was taken) [anproto.com](https://anproto.com) try it at [anproto.com/try](https://anproto.com/try) or use a client such as [wiredove](https://wiredove.net/) +*** -ed25519 keypairs sign timestamp + hash in base64 +### What is ANProto? + ANProto is the spiritual successor to [secure-scuttlebot](https://scuttlebot.io), but without all of the extra stuff that is difficult to maintain. + ANProto is an attempt to argue that [ATProto](https://atprotocom.) is too involved in it's own networking infrastructure to be usefully decentralized. + ANProto operates under the working theory that [Nostr](https://fiatjaf.com/nostr.html) will never reach anyone besides Bitcoiners. +*** + ### Bring your own network! ANProto works over any networking stack. Open the messages from your URL bar! Email them to your friends! Load them on a USB stick an slingshot them over a river! ANProto is non-networked, so you can send and retrieve the messages anyway you want. Try the fetch API or Websockets if you want a good place to start. But maybe dork out trying to send ANProto messages via Bluetooth, LoRa, or sync them via local wifi like you did with Scuttlebot! +*** + ### the JavaScript library! use Deno or your browser diff --git a/example.js b/example.js index 1ce824c..f0c15af 100644 --- a/example.js +++ b/example.js @@ -1,19 +1,18 @@ import { Hono } from "jsr:@hono/hono"; import { serveStatic } from 'jsr:@hono/hono/deno' +import { marked } from 'https://esm.sh/gh/evbogue/bog5@de70376265/lib/marked.esm.js' import { foot, head } from "./template.js"; const app = new Hono(); +const readme = await Deno.readTextFile('./README.md') + app.get('/', async (c) => { const content = `
Step 1. Generate an ed25519 keypair
-const kp = await a.gen()
+ const kp = await an.gen()
@@ -45,7 +44,7 @@ app.get('/try', async (c) => {
Step 2. Hash your blob with sha256
-const hash = await a.hash(content)
+ const hash = await an.hash(content)
@@ -59,7 +58,7 @@ app.get('/try', async (c) => {
Step 3. Sign the ANProto message
-const sig = await a.sign(hash, keypair)
+ const sig = await an.sign(hash, keypair)
@@ -70,7 +69,7 @@ app.get('/try', async (c) => {
Step 4. Open the ANProto message
-const opened = await a.open(msg)
+ const opened = await an.open(msg)
diff --git a/style.css b/style.css
index eae5b5e..66f77a9 100644
--- a/style.css
+++ b/style.css
@@ -11,7 +11,7 @@ body {
blockquote { border-left: 5px solid #f5f5f5; margin-left: none; padding-left: 10px; color: #777; }
-p, h1, h2, h3, h4, h5, h6 { margin-top: 0px; margin-bottom: 2px; }
+p, h1, h2, h3, h4, h5, h6 { margin-top: 5px; margin-bottom: 5px; }
pre {
//color: #dd1144;
@@ -139,8 +139,8 @@ iframe {
background-color: #181818;
color: #f5f5f5;
}
- #navbar { background-color: rgba(24,24,24,0.2); border-bottom: 1px solid orange;}
- #navbar a { color: orange;}
+ #navbar { background-color: rgba(24,24,24,0.2); border-bottom: 1px solid #FE7A00;}
+ #navbar a { color: #FE7A00;}
#navbar:hover { border-bottom: 1px solid magenta;}
.message { background-color: #222; border: 1px solid #333;}
.message:hover { border: 1px solid magenta;}
@@ -151,7 +151,7 @@ iframe {
button:hover { background: #222;}
hr { border: 1px solid #333;}
pre, code { background: #333; color: #f5f5f5;}
- a {color: orange;}
+ a {color: #FE7A00;}
}
.content {margin-top: 5px;}