Skip to content

Instantly share code, notes, and snippets.

View melvincarvalho's full-sized avatar
💭
I may be slow to respond.

Melvin Carvalho melvincarvalho

💭
I may be slow to respond.
View GitHub Profile
@melvincarvalho
melvincarvalho / manifesto.md
Created May 3, 2025 20:51
Agentic Principles Manifesto

🕊️ Agentic Principles Manifesto

A call for autonomy, dignity, and trust in the age of intelligent agents.


1. Agents Must Serve the User First

Agents are extensions of human will—not proxies for corporations. They must act in the user’s interest, not in the interest of advertisers, platforms, or centralized authorities.

@melvincarvalho
melvincarvalho / nrc.md
Created March 23, 2025 20:11
Nostr Ricardian Contracts

Introducing Nostr Ricardian Contracts

Nostr Ricardian Contracts combine the clarity of human-readable, legally enforceable agreements with the cryptographic certainty and decentralization of smart contracts on Bitcoin layers. This innovative approach leverages Nostr, a decentralized messaging protocol, to publish signed human-readable legal agreements that accompany traditional smart contract logic running on Bitcoin-based layers such as RGB, Discreet Log Contracts (DLC), Liquid, or Lightning Network.

Key Elements:

  1. Human-Readable Clarity: Each contract includes a clearly written, legally interpretable text detailing the contractual terms, signed and timestamped as a Nostr note.

  2. Cryptographic Certainty:

@RubenSomsen
RubenSomsen / SwiftSync.md
Last active April 30, 2025 11:25
SwiftSync - smarter synchronization with hints

SwiftSync

Near-stateless, fully parallelizable validation of the Bitcoin blockchain with hints about which outputs remain unspent. All other inputs/outputs are efficiently crossed off inside a single hash aggregate that only reaches zero if validation was successful and the hints were correct.

Introduction

Validation is at the heart of Bitcoin. Any improvements in validation speed will have a direct impact on the scalability of the system, including everything that is built on top of it. For this reason improving validation performance may be one of the most important things we can do.

The generalized observation of SwiftSync is that if we have two sets (in this case the inputs and outputs), and we want to know the difference between these sets (the UTXO set), validating a given answer to this question (the hints) is significantly easier than calculating the answer itself. The novel part here (to my knowledge) is specifically how this can be applied to sets. It seems likely that this observation ca

@melvincarvalho
melvincarvalho / subkeys.md
Last active February 26, 2025 10:42
subkeys.md
nip title status author created discussions-to
TBD
Linked Subkeys for Multi-Device Nostr Usage
Draft
Melvin Carvalho
26-02-2025

Linked Subkeys for Multi-Device Nostr Usage

@melvincarvalho
melvincarvalho / GLYPHS.md
Last active July 25, 2024 13:00
GLYPHS.md

Glyphs

Glyphs allow Bitcoin transactions to etch, mint, and transfer Bitcoin-native digital commodities. They are very similar to the Runes protocol, but rely soley on OP_RETURNs, and do not support inscriptions. Glyphs are designed to be compatible with nostr npubs and bitcoin taproot.

Whereas every glyph is unique, every unit of a glyph is the same. They are interchangeable tokens, fit for a variety of purposes.

Glyphstones

Glyph protocol messages, called glyphstones, are stored in Bitcoin transaction outputs.

NIP-570: Public On-Chain Zaps and Anti-Zaps

Authors Melvin Carvalho optional draft

Disclaimer: this is an early draft and should be considered v0.0.0, use xxzap in testing, so it is not indexed. Final version should probably used OP_PUSHNUM and OP_PUSHBYTES TBD. That said the spec is ready for experimentation and feedback.

Summary

This proposal outlines a method for implementing simple on-chain zaps between Nostr users using Taproot addresses. The proposal includes specifications for both regular zaps and negative zaps (antizaps).

Motivation

@aidik
aidik / Nostr NIP-05 Nginx Only Configuration.md
Last active July 20, 2023 14:53
A simple way how to serve multiple NIP-05 Identifiers using only Nginx

Nostr NIP-05 specification makes it a bit harder to serve identifiers from a simple webserver without CGI to run an external program handling the name URL query parameter. I really didn't want to do all that, so instead I focused on how to handle everything just in Nginx itself.

Prerequisite

  • A server with Nginx responding to basic requests. (minimal configuration should be enough)

Config

Inside the http block insert map and map_hash_bucket_size directives:

map_hash_bucket_size 256;

map $arg_name $nostr_key {

#!/bin/bash
# Mirrors notes from one nostr relay to another.
#
# Example usage:
# nostr-mirror.sh wss://source.relay.example wss://target.relay.example
# Source relay to fetch events from (wss://...).
SOURCE=$1
# Target relay to send these events to (wss://...).
TARGET=$2
@eskema
eskema / nostr-rs-relay_no-docker.md
Last active May 25, 2024 10:05
How to install nostr-rs-relay on ubuntu without Docker

These are the steps I took to install and run a nostr relay on a new server.

First, you'll need the server, this tutorial is using the most basic server Hetzner provides (CX11 - €4.15/mo), you don't need much. If you don't know where to get your server from and decide to go with Hetzner, consider using my affiliate link: https://hetzner.cloud/?ref=4FZql6rUwaeQ

Once you have your server running, log into it via SSH. I'm on a MacOS, so I'll use Terminal as my command line tool. open a new Terminal window and paste the following commands: