Simple XRPL Keypair

node v14.20.1
version: 1.0.0
endpointsharetweet
const crypto = require('crypto') const rippleSecretCodec = require('ripple-secret-codec') const rippleKeypairs = require('ripple-keypairs') const passphrase = 'masterpassphrase' const hexSeed = crypto.createHash('sha512').update(passphrase).digest('hex').toUpperCase().substring(0, 32) console.log('hexSeed: ' + hexSeed) const secret = rippleSecretCodec.encodeHex(hexSeed).secret_b58 console.log('Secret: ' + secret) const keypair = rippleKeypairs.deriveKeypair(secret) const address = rippleKeypairs.deriveAddress(keypair.publicKey) const wallet = { address: address, secret: secret }
Loading…

no comments

    sign in to comment