#stealth #privacy #ethereum #secp256k1 #eth

app stealthereum-cli

CLI for ERC-5564 compliant stealth address management on evm chains

5 unstable releases

new 0.3.0 Nov 8, 2024
0.2.1 Nov 5, 2024
0.2.0 Sep 19, 2023
0.1.1 Sep 17, 2023
0.1.0 Sep 17, 2023

#167 in Magic Beans

Download history 12/week @ 2024-07-28 4/week @ 2024-09-22 31/week @ 2024-09-29 3/week @ 2024-10-06 210/week @ 2024-11-03

211 downloads per month

MIT license

17KB
290 lines

stealthereum-cli

This is a bare bones CLI written in rust for ERC-5564 compliant stealth address management on evm chains

It's currently the easiest way to interact with the eth-stealth-addresses rust library which implements the basic cryptographic operations necessary for a stealth addresses scheme over the secp256k1 curve (with view tags) as outlined here

For now it's extremely rough and low level! More improvements soon

NOT AUDITED - HOMEROLLED CRYPTO - USE AT YOUR OWN RISK

Installation

cargo install stealthereum-cli

Make sure you add $HOME/.cargo/bin to your PATH

Usage

Below is the list of basic commands and arguments for the CLI

keygen

generate a stealth meta address and store the keys

stealthereum keygen -o path/to/keyfile.json

stealth-address

generate all the components of a stealth address as defined in ERC-5564 given a target receiver's stealth meta address to privately send to

stealthereum stealth-address -r 0xReceiverStealthMetaAddres

reveal-stealth-key

compute the private key for a stealth address you control

stealthereum reveal-stealth-key -k path/to/keyfile.json -s 0xStealthAddress -e 0xEphemeralPub

note that this requires you to know in advance what [stealth_address, ephemeral_pubkey] pairs are actually payments meant for your stealth meta address (process will panic otherwise). See scan below for more info on how to scan for private payments to your stealth meta address

scan

scan announced stealth transfers for payments to your stealth meta address

stealthereum scan -k path/to/keyfile.json -s path/to/scanfile.json

this will log the [stealth_address, ephemeral_pubkey] pairs of all stealth transfers that are claimable by you in the scanfile.

For now a scanfile has to be precomputed into a JSON format like so

{
    "announcements": [
        {
            "stealth_address": "0xSomeStealthAddress",
            "ephemeral_pubkey": "0xSomeEphemeralPubkey",
            "view_tag": 116
        },
        {
            "stealth_address": "0xSomeOtherAddress",
            "ephemeral_pubkey": "0xSomeOtherPubkey",
            "view_tag": 94
        }
    ]
}

show-meta-address

recompute your stealth meta address from keyfile

stealthereum show-meta-address -k path/to/keyfile.json

Dependencies

~11–22MB
~222K SLoC