Skip to content

Instantly share code, notes, and snippets.

Sharpiro /
Last active September 12, 2021 12:25 — forked from chris-belcher/
Design for a CoinSwap Implementation for Massively Improving Bitcoin Privacy and Fungibility

Design for a CoinSwap Implementation for Massively Improving Bitcoin Privacy and Fungibility


Imagine a future where a user Alice has bitcoins and wants to send them with maximal privacy, so she creates a special kind of transaction. For anyone looking at the blockchain her transaction appears completely normal with her coins seemingly going from address A to address B. But in reality her coins end up in address Z which is entirely unconnected to either A or B.

Now imagine another user, Carol, who isn't too bothered by privacy and sends her bitcoin using a regular wallet which exists today. But because Carol's transaction looks exactly the same as Alice's, anybody analyzing the blockchain must now deal with the possibility that Carol's transaction actually sent her coins to a totally unconnected address. So Carol's privacy is improved even though she didn't change her behaviour, and perhaps had never even heard of this software.

In a world where advertisers, social media and other companies w

Sharpiro / index.ts
Created February 24, 2020 03:37
decorator validation
View index.ts
function Validate<T extends { new(...args: any[]): {} }>(constructor: T) {
return class extends constructor {
errors: string[]
constructor(...items: any[]) {
this.errors = []
for (const x in this) {
if (this[x] == undefined) {
this.errors.push(`property '${x}' was undefined on class '${}'`)
Sharpiro / img_viewer.html
Last active August 23, 2019 19:44
static image viewer
View img_viewer.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta property="og:image" content="" />
<meta property="og:title" content="Image Viewer" />
<meta property="og:description" content="" />
Sharpiro /
Created August 17, 2019 18:42
http request
import socket
# #
# #
# #
# ip_address = ""
# port = 80
# host = ""
# path = "/"
View SpanExample.cs
using System;
namespace ConsoleApp1
internal class Program
private static void Main(string[] args)
var stringData = "hello Steve";
var dangerousSpan = stringData.AsSpan();