mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-23 05:35:48 +00:00
Remove sjcl-extended/ripple-wallet-generator. Use hash.js & sjcl-codec.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user