[Solved] Generating publickey from private key

Hi all,
Is it possible to generate publickey from private key? Usually, in other blockchains I have seen this feature.

The account system is based on ED25519.

With SDK, you could generate keypair, try this:https://ae-labs.herokuapp.com/

1 Like

@LiuYang.chain what I meant was, given the privatekey to the sdk, can we generate public key? by the way, I developed the ae laboratory :smiley: Happy that you have gone through it and linked here :slight_smile:

I can not remember that there are such functions in golang or python SDK.

We might have to do the ED25519 calculating by ourselves :joy:

1 Like

do you know if they have in js sdk? @yani.chain any idea?

Hey @nduchak.chain @marc0olo Can you provide some information here, please?

@vishwas_hypermine you are able to create it. But you have to NOT use HD wallets, because you will get different public key each time. I have to dig for the code, but you can check the sdk docs. I was using the js-sdk.

Martin

1 Like

Hey, you can import this method from like:
import { getAddressFromPriv } from '@aeternity/aepp-sdk/es/utils/keystore

1 Like

@nduchak.chain Perfect! this worked thanks! :slight_smile: Now with this I will be able to reduce one field (publickey) from the laboratory.

1 Like

@martingrigorov.chain In ECDSA, given the privatekey point § and base point G, the public key (pk) can be calculated using formula, (pk) = §*G. so there must be a function in library which should return the publickey key, given the private key as input, theoretically.