Jump to content
Sign in to follow this  
Dario_o

How to generate keypairs in Python?

Recommended Posts

There's this JS script to run the Ripple-keypairs module in Node,

var keypairs = require('ripple-keypairs');
var seed = keypairs.generateSeed();
var keypair = keypairs.deriveKeypair(seed);
console.log("Ripple-address: " + keypairs.deriveAddress(keypair.publicKey));
console.log("Ripple-secret:  " + seed);

Is there an equivalent script in Python maybe?

 

Share this post


Link to post
Share on other sites

There's https://github.com/arsenlosenko/python-ripple-lib, I'm not sure if they implemented keypair generation already. Shouldn't be too hard to do, just generate a seed, derive a keypair from it and encode the hash of the public key in base58 with checksum and a custom alphabet to get the address.

Make sure to use good(!) entropy when generating the seed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...