#gas #privacy #ethereum #stealth #eth

app stealth-gas-cli

CLI for managing Ethereum blind gas tickets on client side

5 releases

0.1.0 Jan 25, 2025
0.0.4 Jan 24, 2025
0.0.3 Jan 24, 2025
0.0.2 Jan 12, 2025
0.0.1 Jan 8, 2025

#5 in #eth

Download history 107/week @ 2025-01-05 176/week @ 2025-01-12 226/week @ 2025-01-19 113/week @ 2025-01-26 24/week @ 2025-02-02

547 downloads per month

MIT license

50KB
885 lines

stealth-gas-cli

a command line tool for client side operations with a Stealth Gas Station service. It wraps the eth-stealth-gas-tickets rust library for cryptographic operations.

Installation

cargo install stealth-gas-cli

Supported Networks

  • Holesky Ethereum (chain id: 17000)

(more soon)

Basic Usage

step 1: generate 10 unsigned tickets and store them locally

stealth-gas new -n 10

step 2: call buyGasTickets onchain to take your 10 locally created unsigned tickets and buy them from the coordinator

stealth-gas buy -i ~/.stealthereum/unsigned_tickets_17000.json -k 0xYourPrivateKey

step 3: after buying gas tickets and waiting (~15 min must wait usually, but up to ~1 hour at worst) finalize your tickets

stealth-gas finalize --start-block 3048901 -i ~/.stealthereum/unsigned_tickets_17000.json

step 4: user can now send a SpendRequest to the coordinator server and redeem the 10 signed tickets (or any number of tickets depending on how many SignedTickets are in the input JSON file of finalized tickets)

stealth-gas redeem -s '[{"amount": "9900000000000000", "receiver": "0xYourAnonAddress"}]' -i ~/.stealthereum/finalized_tickets_17000.json

here we redeem 10 signed tickets worth 0.01 ETH in total. We send 0.0099 ETH to 0xYourAnonAddress. (Since there is leftover the coordinator will take it and transfer herself 0.0001 ETH assuming it's a tip)

Since 0xYourAnonAddress is anonymous, then redeemer retains privacy because no one knows which ticket was redeemed (not even the coordinator).

Command options

see stealth-gas help and stealth-gas <command> --help for more details on each command.

Dependencies

~40–54MB
~853K SLoC