Skip to content

Instantly share code, notes, and snippets.

@Giszmo
Giszmo / Silent_Payments.md
Created March 28, 2022 17:12 — forked from RubenSomsen/Silent_Payments.md
Silent Payments – Receive private payments from anyone on a single static address without requiring any interaction or on-chain overhead

Silent Payments

Receive private payments from anyone on a single static address without requiring any interaction or on-chain overhead.

Overview

The recipient generates a so-called silent payment address and makes it publicly known. The sender then takes a public key from one of their chosen inputs for the payment, and uses it to derive a shared secret that is then used to tweak the silent payment address. The recipient detects the payment by scanning every transaction in the blockchain.

Compared to previous schemes[^1], this scheme avoids using the Bitcoin blockchain as a messaging layer[^2] and requires no interaction between sender and recipient[^3] (other than needing to know the silent payment address). The main downsides are the scanning requirement, the lack of light client support, and the requirement to control your own input(s). An example use case would be private one-time donations.

package org.bitcoinj.core;
import org.bitcoinj.testing.TestWithWallet;
import org.bitcoinj.utils.ListenerRegistration;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.rules.Stopwatch;
import java.util.List;
Verifying that +giszmo is my blockchain ID. https://onename.com/giszmo

Keybase proof

I hereby claim:

  • I am giszmo on github.
  • I am giszmo (https://keybase.io/giszmo) on keybase.
  • I have a public key ASD9Crncmh182A27nrbbz5nNIxdMkrfEZr0uSQiev6NB-go

To claim this, I am signing this object:

# this little script helps me enter bitcoin addresses in bitcoin-core.
# It enters an address that I scan, skips to the value field, enters 3
# and adds another recipient. I made it to charge paper wallets with 3mɃ.
import os
import time
from subprocess import Popen, PIPE
upper_pattern='xte "keydown Shift_L" "key {}" "keyup Shift_L"'
default_pattern='xte "key {}"'