Skip to content

Adding keypair generation to cli.ts#353

Merged
ineiti merged 2 commits intomainfrom
add_key_ts
Sep 15, 2023
Merged

Adding keypair generation to cli.ts#353
ineiti merged 2 commits intomainfrom
add_key_ts

Conversation

@ineiti
Copy link
Member

@ineiti ineiti commented Sep 13, 2023

Putting the keypair generation in typescript.

@ineiti ineiti requested a review from a team as a code owner September 13, 2023 07:45
@ineiti ineiti self-assigned this Sep 13, 2023
const ed25519 = curve.newCurve('edwards25519');
const priv = ed25519.scalar().pick();
const pub = ed25519.point().mul(priv);
console.log(`PRIVATE_KEY=${priv}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

is it normal to simply print them instead of saving them where they are needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

The goal here is to create the values that are needed for the .env file, so not to store them anywhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a line saying "please make sure to store this somewhere" as people might indeed expect the values to also be written to a file

Copy link
Member Author

Choose a reason for hiding this comment

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

Added an output, but now it won't be usable in scripts anymore...

Copy link
Contributor

@pierluca pierluca left a comment

Choose a reason for hiding this comment

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

Minor remarks.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@ineiti ineiti merged commit f610443 into main Sep 15, 2023
@ineiti ineiti deleted the add_key_ts branch September 15, 2023 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants