FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Save/load private key to file "clientKey" by r4f4ss · Pull Request #178 · optimism-java/shisui · GitHub

Save/load private key to file "clientKey" - #178

Merged
r4f4ss merged 4 commits into
optimism-java:portalfrom
r4f4ss:save_private_key
Oct 1, 2024
Merged

Save/load private key to file "clientKey"#178
r4f4ss merged 4 commits into
optimism-java:portalfrom
r4f4ss:save_private_key

Conversation

r4f4ss commented Sep 29, 2024
edited
Loading

Copy link
Copy Markdown

fixes #168

  1. If flag --private.key is used, use the key received
  2. Looks for file dataDir/clientKey for a key, if find one, use it as private key
  3. If can not find a key, creates a new one
  4. Always writes the current key to the file dataDir/clientKey

Comment thread cmd/shisui/main.go Outdated
keyEnc := hex.EncodeToString(crypto.FromECDSA(privateKey))

fullPath := filepath.Join(config.DataDir, fileName)
file, err := os.OpenFile(fullPath, os.O_CREATE|os.O_WRONLY, 0700)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

maybe we can use 0600

r4f4ss merged commit ee38628 into optimism-java:portal Oct 1, 2024
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

save the private key of the node

2 participants


Back | FazBrowse Home | New Git URL