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 #27

Merged
merged 5 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 RELAYER_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.

@jsanmigimeno jsanmigimeno added the enhancement New feature or request label May 31, 2024
@jsanmigimeno jsanmigimeno requested a review from reednaa May 31, 2024 10:03
@jsanmigimeno jsanmigimeno changed the base branch from main to testnet May 31, 2024 10:03
@jsanmigimeno jsanmigimeno merged commit 2736f9b into testnet Jul 24, 2024
1 check passed
@jsanmigimeno jsanmigimeno deleted the jsanmi/overhaul-private-key-management branch July 25, 2024 13:13
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.

1 participant