feat: ERC5564 Stealth Address scanning#1
Open
joshieDo wants to merge 2 commits into
Open
Conversation
shekhirin
reviewed
Jul 15, 2024
Comment on lines
+5
to
+21
| ## 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 | ||
| ``` |
Member
There was a problem hiding this comment.
can we show a full flow of generating the address and using it, including the command outputs?
Comment on lines
+45
to
+49
| // 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()?; |
Member
There was a problem hiding this comment.
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)] | |||
Comment on lines
+35
to
+37
| let expect_str = "to be 33 bytes."; | ||
|
|
||
| let eph_pub = hex::decode(value).expect(expect_str); |
Member
There was a problem hiding this comment.
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. |
Member
There was a problem hiding this comment.
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stealth addresses
Scans committed blocks for stealth addresses according to ERC5564.
Node
export VIEW_KEY=0x... stealthy node ...Generation