Skip to content

Lesson 5: doubts about deploy.js (publickey&privatekey) #3134

Answered by Finn66
Finn66 asked this question in Q&A
Discussion options

You must be logged in to vote

Got it,Public key is generated by private key

        const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));
        defineReadOnly(this, "publicKey", "0x" + keyPair.getPublic(false, "hex"));
        defineReadOnly(this, "compressedPublicKey", "0x" + keyPair.getPublic(true, "hex"));

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Finn66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant