Create account -> Generate key pair

Hi all,

I’m trying to generate a keypair in order to create a flow account.

I’m using elliptic library with this code:

const ec = new ec(‘p256’)
const key = ec.genKeyPair();

the problem is I’m checking the public key in trying to create an account but always produce the error “Account creation failed”

A example of public key is:


if I generate the public and private key with flocli the process work.

any idea about what is the problem?

best regards

remove the leading 04 which means uncompressed key.


should work

Correct, now work it. Thank you very much bluesing,