-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ERC5564
Stealth Address scanning
#1
base: main
Are you sure you want to change the base?
Conversation
## Node | ||
|
||
```bash | ||
export VIEW_KEY=0x... | ||
stealthy node | ||
``` | ||
|
||
## Generation | ||
|
||
```bash | ||
Usage: stealthy gen [OPTIONS] <COMMAND> | ||
|
||
Commands: | ||
addr Generate a stealth address from a stealth meta address alongside an optional encrypted note | ||
meta Generate a stealth meta address from view and spend private keys | ||
key Generate the stealth address private key from the ephemeral public key and view & spend private keys | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we show a full flow of generating the address and using it, including the command outputs?
// add network name to logs dir | ||
self.logs.log_file_directory = | ||
self.logs.log_file_directory.join(self.chain.chain.to_string()); | ||
|
||
let _guard = self.logs.init_tracing()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to do it separately here? Node
command should already handle it for us I think
@@ -0,0 +1,160 @@ | |||
#![allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
let expect_str = "to be 33 bytes."; | ||
|
||
let eph_pub = hex::decode(value).expect(expect_str); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be inlined? same in other places
|
||
/// Checks every committed chain of blocks for stealth addresses belonging to us according to [ERC-5564](https://eips.ethereum.org/EIPS/eip-5564). | ||
/// | ||
/// Assumes that `VIEW_KEY` has been set as an environment variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we can show how to pass a custom node CLI argument here
cli::Cli::parse().run(|builder, _| async move { | ||
let handle = builder | ||
.node(EthereumNode::default()) | ||
.install_exex("Stealthy", init_stealthy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be inlined
Stealth addresses
Scans committed blocks for stealth addresses according to ERC5564.
Node
export VIEW_KEY=0x... stealthy node ...
Generation