Skip to content

Instantly share code, notes, and snippets.

@libitx
libitx / example.js
Created December 7, 2021 10:31
Univrse symmetric encryption example
import { Envelope, Key } from 'univrse'
(async _ => {
// However you generate the key is up to you,
// but ideally you want a buffer-like object of 128 or 256 bits
const rawKey = new Uint8Array(16)
crypto.getRandomValues(rawKey)
// Turn into oct key like so
// Yeah there should be a more intuitive way of doing this
@libitx
libitx / PCSig.md
Last active August 21, 2020 12:48
Simple OP_RETURN Parent and Child Signatures

Simple OP_RETURN Parent and Child Signatures - PCSig

A simple and flexible OP_RETURN protocol for signing any Bitcoin transaction output with ECDSA signatures.

By combining two signatures, transactions can be created that represent a directed graph of related data, with ownership and identity dynamics baked in.

  • Very simple protocol with sensible conventions, entirely encapsulated in OP_RETURN outputs.
@libitx
libitx / 1.package.json
Last active June 29, 2020 22:09
Dual load bsv1 and bsv2, and resolve dependencies to specific versions
{
"dependencies": {
"bsv1": "npm:bsv@^1.5",
"bsv2": "npm:bsv@^2.0.0-beta",
...
}
...
}
@libitx
libitx / BitDomain.md
Last active April 29, 2024 19:14
DRAFT BitDomain specification

BitDomain DNS specification

The BitDomain specification defines a simple mechanism whereby a DNS record can be used to associate a domain name with a Bitcoin address, and optionally use a cryptographic signature to assert that the owner of a Bitcoin address has authority over the domain name.

DNS Record

The BitDomain DNS record is a TXT record attached to a hostname prefixed with the subdomains bsv._bitdomain.

The record's value is made up of informational elements represented in key=value pairs.