Move to new ripple-keypairs API

This commit is contained in:
Chris Clark
2015-09-22 15:31:10 -07:00
parent 7b5d6e9fc5
commit 715c648d52
14 changed files with 52 additions and 288 deletions

View File

@@ -29,8 +29,10 @@ function toRippledAmount(amount: Amount): string|Amount {
}
function generateAddress(options?: Object): Object {
const {accountID, seed} = keypairs.generateWallet(options);
return {secret: seed, address: accountID};
const secret = keypairs.generateSeed(options);
const keypair = keypairs.deriveKeypair(secret);
const address = keypairs.deriveAddress(keypair.publicKey);
return {secret, address};
}
type AsyncFunction = (...x: any) => void