Event JSON
{
"id": "a38e7f4be3442831215a7c3e015fdfce9c8af4ce6653a02f9e1e0e03a0d42a34",
"pubkey": "ea91ee2eff0942115b5515bbdbee1259bcf899f8dc79b33d58524d104e3d5eb5",
"created_at": 1776357258,
"kind": 0,
"tags": [
[
"client",
"Primal Web"
]
],
"content": "{\"name\":\"144MB\",\"about\":\"I sign Floppy PNGs with the same private key associated with this npub.\\n\\nMy entire software repo is inside my banner PNG. It can be extracted with this script:\\n\\nDeno.writeFileSync(\\\"f.z\\\",Deno.readFileSync(\\\"f.png\\\").slice(41,-16))\\nnew Deno.Command('pigz',{args:['-d','-f','-k','f.z']}).outputSync()\\nlet extracted_data=Deno.readFileSync('f')\\nconst data_length=parseInt(new TextDecoder().decode(extracted_data.slice(65,4120)).split('\\\\n')[0])\\nconst unfiltered=new Uint8Array(extracted_data.length)\\nlet f=0,p=0,r=0\\ndo{if(r==4140||f==0){f++;r=0;} else {unfiltered[p]=extracted_data[f];r++;f++;p++;}}while(f\u003cextracted_data.length)\\nlet site_text=(new TextDecoder().decode(unfiltered.slice(542340,542340+data_length)))\\nDeno.writeTextFileSync('site.txt',site_text)\\n\\nThis should be verified. I sign the data part of the PNG and use the top row to store the secp256k1 signature. This can be verified with this script:\\n\\nimport { sha256 } from \\\"@noble/hashes/sha2\\\";\\nimport { schnorr } from \\\"@noble/curves/secp256k1\\\";\\nimport * as pako from \\\"pako\\\";\\ntry {\\n let f = 0, p = 0, r = 0;\\n const fpng_img = Deno.readFileSync(Deno.args[0]);\\n const pub = Deno.readTextFileSync(Deno.args[1]).trim();\\n const zdat = pako.inflate(fpng_img.slice(41, -16));\\n const u = new Uint8Array(zdat.length);\\n do {\\n if (r == 4140 || f == 0) {\\n f++;\\n r = 0;\\n } else {\\n u[p] = zdat[f];\\n r++;\\n f++;\\n p++;\\n }\\n } while (f \u003c zdat.length);\\n const dl=parseInt(new TextDecoder().decode(zdat.slice(65,4140)).split('\\\\n')[0])\\n console.log(schnorr.verify(\\n new Uint8Array(zdat.slice(1, 65)),\\n sha256(u.slice(542340, dl + 542340)),\\n pub,\\n ));\\n} catch {\\n console.log(\\\"Usage: lverify [Floppy PNG] [144MB Hex Public Key]\\\");\\n}\\n\\nThe extract script itself can be extracted from the Floppy PNG using the instructions on the header of the banner of the PNG in my profile banner. It is all so wonderfully self-referential, no? \\n\\nNote that to use the verify script you need something like this package.json:\\n {\\n \\\"name\\\": \\\"anything\\\",\\n \\\"version\\\": \\\"1.0.0\\\",\\n \\\"dependencies\\\": {\\n \\\"@noble/curves\\\": \\\"^1.9.2\\\",\\n \\\"@noble/hashes\\\": \\\"^1.8.0\\\",\\n \\\"pako\\\": \\\"^2.1.0\\\"\\n }\\n}\\n\\nLater versions of noble/curves need a different import. Also, if you want to use that same site.txt file to load a web page, you can use this:\\n\\n\u003c!DOCTYPE html\u003e\\n\u003chtml lang=\\\"en\\\"\u003e\\n \u003chead\u003e\\n \u003cmeta charset=\\\"utf-8\\\"\u003e\\n \u003ctitle\u003eFloppy PNG\u003c/title\u003e\\n \u003cmeta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1\\\"\u003e\\n \u003c/head\u003e\\n \u003cbody\u003e\\n \u003cdiv id=\\\"l\\\"\u003e\u003c/div\u003e\\n \u003cscript\u003e\\n fetch('site.txt').then((resp) =\u003e {\\n resp.text().then((t)=\u003e{\\n s = document.createElement(\\\"script\\\");\\n s.appendChild(document.createTextNode(t));\\n document.body.appendChild(s);\\n })})\\n \u003c/script\u003e\\n \u003cdiv id=\\\"main\\\"\u003e\u003c/div\u003e\\n \u003c/body\u003e\\n\u003c/html\u003e\\n\\nYou need to remove the verify() command for it to work as a live web page. Verify the sig separately, remove the line, and spin up some kind of local web server. Most of the time the verify() command is the last line of site.txt. The web application for all browsers is listed in the floppypng.com repo (src/browser.js).\",\"nip05\":\"\",\"picture\":\"https://blossom.primal.net/fa770c4491f194fb746c3bbd9949262b6fef8a98dab8a0c6e35a67bfd54a6c66.gif\",\"display_name\":\"144MB\",\"banner\":\"https://image.nostr.build/1995cf2f1eb12af2d98c3ff471cbdd2ffc2c49d6517fa8e23d79def668ac9733.png\",\"displayName\":\"144MB\"}",
"sig": "14cf926f97aba18f025ba9e0badd4eb9e66e4bb13d42c289f4473f3a89e3c4c8ee749f21e1e934a556812c19b976590cf8d71c90d10cff96842afdb3bec4adb2"
}