Remove sjcl-extended/ripple-wallet-generator. Use hash.js & sjcl-codec.

This commit is contained in:
Nicholas Dudfield
2015-08-13 11:58:25 +07:00
parent 8c431b4ec3
commit 5837aa23ea
19 changed files with 96 additions and 166 deletions

View File

@@ -5,6 +5,7 @@ const BigNumber = require('bignumber.js');
const core = require('../../core');
const errors = require('./errors');
const es6promisify = require('es6-promisify');
const keypairs = require('ripple-keypairs');
type Amount = {currency: string, issuer: string, value: string}
@@ -27,6 +28,11 @@ function toRippledAmount(amount: Amount): string|Amount {
};
}
function generateWallet(options?: Object): Object {
const {accountID, seed} = keypairs.generateWallet(options);
return {secret: seed, address: accountID};
}
type AsyncFunction = (...x: any) => void
function wrapCatch(asyncFunction: AsyncFunction): AsyncFunction {
@@ -95,6 +101,7 @@ module.exports = {
dropsToXrp,
xrpToDrops,
toRippledAmount,
generateWallet,
composeAsync,
wrapCatch,
convertExceptions,