Skip to content
Discussion options

You must be logged in to vote

Ok I figured it out - it seems for some reason SigningKey.computePublicKey(process.env.ETHEREUM_PRIVATE_KEY) which I was using to view the public key given my PK has this property:

// raw public key; use uncompressed key with 0x04 prefix
if (bytes.length === 64) {
const pub = new Uint8Array(65);
pub[0] = 0x04;
pub.set(bytes, 1);
bytes = pub;
}

so they were the same public keys, it just appended 0x04 to the front (not sure why they do this)

So, it turns out that my signatures are producing the right output and recovering the Public Key correctly.

Replies: 2 comments 19 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
19 replies
@alinush
Comment options

alinush Sep 24, 2024
Collaborator

@LawsonGraham
Comment options

@alinush
Comment options

alinush Sep 24, 2024
Collaborator

@LawsonGraham
Comment options

Answer selected by alinush
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants