stealth-gas-cli

Crates.iostealth-gas-cli
lib.rsstealth-gas-cli
version
sourcesrc
created_at2025-01-08 18:52:03.048101
updated_at2025-01-08 18:52:03.048101
descriptionCLI for managing Ethereum blind gas tickets on client side
homepagehttps://github.com/kassandraoftroy/eth-stealth-gas-tickets
repositoryhttps://github.com/kassandraoftroy/eth-stealth-gas-tickets
max_upload_size
id1508947
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
κασσάνδρα.eth (kassandraoftroy)

documentation

README

stealth-gas-cli

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

Installation

cargo install stealth-gas-cli

Supported Networks

  • Holesky Ethereum (chain id: 17000)

(more soon)

Usage

step 1: fetch the coordinator pubkey and other public parameters (this is just for convenience you can fetch this onchain yourself as well)

stealth-gas params --rpc-url https://ethereum-holesky-rpc.publicnode.com

step 2: generate unsigned tickets

stealth-gas new --k 0xCoordinatorPubKey --n 10 --o unsigned_tickets.json

now user can extract the msg data from each unsigned ticket and craft a buyGasTickets() transaction on the StealthGasStation contract (see contract repo for a helper script to do this)

step 3: after buying gas tickets (wait for finalization), scan the chain for blind signatures that match your unsigned tickets

stealth-gas scan --rpc-url https://ethereum-holesky-rpc.publicnode.com -c 0xGasStationAddress -i unsigned_tickets.json -s 1000000 --o finalizeable.json

step 4: finalize the blind signatures to generate redeemable gas tickets

stealth-gas finalize --rpc-url https://ethereum-holesky-rpc.publicnode.com --i finalizeable.json --o signed_tickets.json

with finalized gas tickets user can now send a SpendRequest to the coordinator server and redeem any number of finalized gas tickets, pointing the funds to the address of their choosing.

example:

curl -X POST http://coordinatorURL.com/spend -H "Content-Type: application/json" -d '{ "signatures": [<SignedTickets>], "spends": [{"amount": "2000000000000000", "receiver": "0xYourAddress"}]}'

here we redeem two signed tickets (of 0.001 ETH each) and send all the result to 0xYourAddress. If 0xYourAddress is anonymous, then redeemer retains privacy because no one knows which ticket was redeemed (not even the coordinator).

Commit count: 9

cargo fmt