RateLimited°C
09-22-2024
BSV
$47.87
Vol 14.44m
-3.33%
BTC
$62526
Vol 13784.51m
-1.03%
BCH
$337.42
Vol 171.48m
-1.09%
LTC
$67.09
Vol 292.21m
1.41%
DOGE
$0.1
Vol 554.5m
-2.79%

This post was first published on Medium.

nChain
Vanity Address

Previously, we have shown a novel and private way to purchase Bitcoin vanity addresses, using Zero-Knowledge Key-Statement Proof. In practice, it has one drawback: after the buyer verifies the proof in step 7, he can abort the exchange protocol and the seller wastes resources to find an answer but does not get paid.

To overcome this drawback, we conduct the exchange entirely on chain using a smart contract. It only pays out if a private key is provided such as the derived/combined public key/address meets the vanity pattern. Full code is shown below.

 

To compute point addition (Line 16) and multiplication (Line 13) efficiently, we leverage the same technique as before. After we have the combined public key, we validate its corresponding address meets the predefined vanity pattern at Line 19.

Extension

We have only showed how to verify the derived address has certain prefix. But it is straightforward to extend it to have the address or the public key meet any arbitrary requirement.

Watch: CoinGeek New York presentation, Smart Contracts & Computation on Bitcoin

Recommended for you

Blockchain enables autonomous AI agents to learn
Utilizing blockchain tech, a group of Belgian scientists enabled autonomous AI agents to learn and communicate securely, contributing to the...
September 17, 2024
WhatsOnChain gets own UTXO endpoints for BSV blockchain services
With ElectrumX set to retire in October, WhatsOnChain is gearing up to implement a new UTXO set of API endpoints,...
September 16, 2024
Advertisement