Generate keypair from seed

Hi,

We are generating keypair from seed using nacl.sign.keyPair.fromSeed (so using tweetnacl module, as ae actually uses tweetnacl under the hood, so it is compatible). That works, but it requires importing tweetnacl library which takes up space, so it would be nicer just to have Ae lib in the project. However, @aeternity/aepp-sdk Crypto has only generateKeyPair but no generation from seed. It seems though in browser bundle aepp-sdk.browser-script.js there is e.sign.keyPair.fromSeed=function(e){…
What would be the best practice to get access to fromSeed functionality in nodejs project?

Tnx

@bruteforce.chain can help perhaps

1 Like
1 Like

@bruteforce.chain hey tnx for the answer! :slight_smile: problem is the solution you sent internally uses:
function getKeyPair (secretKey) {
return nacl.sign.keyPair.fromSeed(secretKey)
}

so nacl.sign.keyPair.fromSeed is from nacl library, and as I explained, I am trying to avoid using this library to reduce the size of the frontend app…so I am looking for a solution using just Ae or a small amount of extra code (tweetnacl is a very large lib)

never mind, tweetnacl is actually very small, it is libsodium-sumo that is large, as the name says :smiley: and that is dependency of @aeternity lib itself, so no getting around that it seems. tnx anyway :slight_smile:

4 Likes