-
Notifications
You must be signed in to change notification settings - Fork 12
How to create Keys
Junha Yang(양준하) edited this page Jul 20, 2020
·
1 revision
Our tools foundry account
and foundry-keystore-cli
do not expose public key and private key. There are two reasons. A normal user does not need a public key and a private key. (We assumed that a developer can write a script easily that prints private key and public key). Printing private key has a security problem. A suer must keep their private key as an encrypted form.
Since we are developers, we need a script that prints private key and public key.
const { generatePrivateKey } = require("foundry-primitives");
console.log(generatePrivateKey());
const { getPublicFromPrivate } = require("foundry-primitives");
console.log(
getPublicFromPrivate(
"PRIVATE_KEY"
)
);