Skip to content
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]: Overhaul private key management #16

Merged
merged 4 commits into from
Jul 24, 2024

Conversation

jsanmigimeno
Copy link
Member

The way the privateKey is loaded has been updated. The new implementation:

  • Still supports specifying the privateKey on the config file. This is for backwards compatibility and for ease of development. A warning to the console is printed if this method is used.
  • If no privateKey configuration is specified, the privateKey is loaded from the environment variable UNDERWRITER_PRIVATE_KEY using the env privateKey loader. (The variable name is customizable for advanced users.)
  • Custom privateKey loaders may be implemented (configured via global.privateKey.loader). This boils down to implementing a class with an async function that returns a privateKey as a hex string. The returned privateKey format is validated to avoid hard to debug implementation errors.

This issue is a mirror of catalystdao/generalised-relayer#27

@jsanmigimeno jsanmigimeno added the enhancement New feature or request label May 31, 2024
@jsanmigimeno jsanmigimeno requested a review from reednaa May 31, 2024 10:40
Copy link
Member

@reednaa reednaa left a comment

Choose a reason for hiding this comment

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

Lgtm

@jsanmigimeno jsanmigimeno merged commit 6880909 into testnet Jul 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants