Bitcoin Graffiti work in progress
← Timeline text · 2014
#!/usr/bin/env python3
#
# This file is placed in the public domain.
#
# CryptoGraffiti tool
#
# Requires python-bitcoinlib-v0.2.1
#
# https://github.com/petertodd/python-bitcoinlib
#
# pip install python-bitcoinlib

# Usage:
#
# ./cryptograffiti.py <textfile>

import collections
import sys

from bitcoin.rpc import Proxy
from bitcoin.wallet import *

DUST = 0.000055

addrs = collections.OrderedDict()
with open(sys.argv[1], 'rb') as fd:
    while True:
        b = fd.read(20)

        if not b:
            break

        addr = P2PKHBitcoinAddress.from_bytes(b.ljust(20))
        addrs[str(addr)] = DUST

addrs['1MVpQJA7FtcDrwKC6zATkZvZcxqma4JixS'] = 0.0009

print('%d outputs with total cost: %f mBTC + fees' % (len(addrs), sum(addrs.values())*1000))

r = input('Send? y/n\n')

if r == 'y':
    proxy = Proxy()
    r = proxy.sendmany('', addrs)
    print('Sent: %s' % r)

else:
    print('Canceled!')
Open the raw reconstruction ↗
text P2FKH ✓ Verified on-chain

CryptoGraffiti Python tool (source)

Written to the chain on 27 Sep 2014, block 322,834.

Block
322,834
Written
27 Sep 2014
Size
920 B
Format
CODE
Transactions
1

About this artifact

#!/usr/bin/env python3 ... CryptoGraffiti tool

How it was stored

A normal pay-to-public-key-hash output contains a 20-byte public-key hash. A data uploader can put arbitrary 20-byte chunks in that field instead. To the network it looks like many ordinary-looking outputs, but the “addresses” are fake because nobody knows a private key whose public key hashes to those bytes.

More about P2FKH
Proof · 1 transaction

Verified against the chain

Every byte shown here was read from these transactions. Open one in a block explorer to check it yourself.