mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
Move deriveKeypair and deriveAddress to offline module
This commit is contained in:
@@ -45,6 +45,7 @@ import sign from './transaction/sign'
|
||||
import combine from './transaction/combine'
|
||||
import submit from './transaction/submit'
|
||||
import {generateAddressAPI} from './offline/generate-address'
|
||||
import {deriveKeypair, deriveAddress} from './offline/derive'
|
||||
import computeLedgerHash from './offline/ledgerhash'
|
||||
import signPaymentChannelClaim from './offline/sign-payment-channel-claim'
|
||||
import verifyPaymentChannelClaim from './offline/verify-payment-channel-claim'
|
||||
@@ -66,7 +67,6 @@ import {
|
||||
import RangeSet from './common/rangeset'
|
||||
import * as ledgerUtils from './ledger/utils'
|
||||
import * as transactionUtils from './transaction/utils'
|
||||
import * as commonUtils from './common/utils'
|
||||
import * as schemaValidator from './common/schema-validator'
|
||||
import {getServerInfo, getFee} from './common/serverinfo'
|
||||
import {clamp} from './ledger/utils'
|
||||
@@ -111,7 +111,6 @@ class RippleAPI extends EventEmitter {
|
||||
validate,
|
||||
RangeSet,
|
||||
ledgerUtils,
|
||||
commonUtils,
|
||||
schemaValidator
|
||||
}
|
||||
|
||||
@@ -323,6 +322,8 @@ class RippleAPI extends EventEmitter {
|
||||
submit = submit
|
||||
|
||||
generateAddress = generateAddressAPI
|
||||
deriveKeypair = deriveKeypair
|
||||
deriveAddress = deriveAddress
|
||||
computeLedgerHash = computeLedgerHash
|
||||
signPaymentChannelClaim = signPaymentChannelClaim
|
||||
verifyPaymentChannelClaim = verifyPaymentChannelClaim
|
||||
@@ -335,9 +336,6 @@ class RippleAPI extends EventEmitter {
|
||||
|
||||
isValidAddress = schemaValidator.isValidAddress
|
||||
isValidSecret = schemaValidator.isValidSecret
|
||||
|
||||
deriveKeypair = commonUtils.deriveKeypair
|
||||
deriveAddress = commonUtils.deriveAddress
|
||||
}
|
||||
|
||||
export {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as _ from 'lodash'
|
||||
import BigNumber from 'bignumber.js'
|
||||
import {deriveKeypair, deriveAddress} from 'ripple-keypairs'
|
||||
import {deriveKeypair} from 'ripple-keypairs'
|
||||
import {Amount, RippledAmount} from './types/objects'
|
||||
import {ValidationError} from './errors'
|
||||
|
||||
@@ -155,8 +155,6 @@ export {
|
||||
removeUndefined,
|
||||
rippleTimeToISO8601,
|
||||
iso8601ToRippleTime,
|
||||
isValidSecret,
|
||||
deriveKeypair,
|
||||
deriveAddress
|
||||
isValidSecret
|
||||
}
|
||||
|
||||
|
||||
7
src/offline/derive.ts
Normal file
7
src/offline/derive.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import {deriveKeypair, deriveAddress} from 'ripple-keypairs'
|
||||
|
||||
export {
|
||||
deriveKeypair,
|
||||
deriveAddress
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user