Skip to content

Instantly share code, notes, and snippets.

@lakshmankashyap
Forked from Anderson-Juhasc/hdwallet.js
Created March 16, 2018 18:42
Show Gist options
  • Save lakshmankashyap/418158d707bcad5bdcb04232946bc2b9 to your computer and use it in GitHub Desktop.
Save lakshmankashyap/418158d707bcad5bdcb04232946bc2b9 to your computer and use it in GitHub Desktop.
var Bitcore = require('bitcore');
var Address = Bitcore.Address;
var HDPrivateKey = Bitcore.HDPrivateKey;
var hdPrivateKey = new HDPrivateKey.fromSeed("bf8e06fd8c0dafbc831933422895ad68c0874439e177f136f8f756b360de94f8");
var hdPublicKey = hdPrivateKey.hdPublicKey;
var address = new Address(hdPublicKey.derive( Math.floor(Date.now() / 1000) ).publicKey);
var derivedAddress = new Address(hdPublicKey.derive( Math.floor(Date.now() / 1000) ).publicKey);
console.log(address);
console.log(derivedAddress);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment