mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 12:45:50 +00:00
Revert "Expose validation methods in public api"
This reverts commit 9e9a0a7d9b.
We should move methods like deriveKeypair and deriveAddress
off of the schemaValidator object.
This commit is contained in:
@@ -109,7 +109,8 @@ class RippleAPI extends EventEmitter {
|
||||
static _PRIVATE = {
|
||||
validate,
|
||||
RangeSet,
|
||||
ledgerUtils
|
||||
ledgerUtils,
|
||||
schemaValidator
|
||||
}
|
||||
|
||||
constructor(options: APIOptions = {}) {
|
||||
@@ -328,8 +329,6 @@ class RippleAPI extends EventEmitter {
|
||||
dropsToXrp = dropsToXrp
|
||||
iso8601ToRippleTime = iso8601ToRippleTime
|
||||
txFlags = txFlags
|
||||
|
||||
static schemaValidator = schemaValidator
|
||||
}
|
||||
|
||||
export {
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as assert from 'assert'
|
||||
const {Validator} = require('jsonschema')
|
||||
import {ValidationError} from './errors'
|
||||
import {isValidAddress} from 'ripple-address-codec'
|
||||
import {isValidSecret,deriveKeypair,deriveAddress} from './utils'
|
||||
import {isValidSecret} from './utils'
|
||||
|
||||
function loadSchemas() {
|
||||
// listed explicitly for webpack (instead of scanning schemas directory)
|
||||
@@ -158,8 +158,5 @@ function schemaValidate(schemaName: string, object: any): void {
|
||||
|
||||
export {
|
||||
schemaValidate,
|
||||
isValidAddress,
|
||||
isValidSecret,
|
||||
deriveKeypair,
|
||||
deriveAddress
|
||||
isValidSecret
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ const hashes = require('./fixtures/hashes');
|
||||
const address = addresses.ACCOUNT;
|
||||
const utils = RippleAPI._PRIVATE.ledgerUtils;
|
||||
const ledgerClosed = require('./fixtures/rippled/ledger-close-newer');
|
||||
const schemaValidator = RippleAPI.schemaValidator;
|
||||
const schemaValidator = RippleAPI._PRIVATE.schemaValidator;
|
||||
const binary = require('ripple-binary-codec');
|
||||
const BigNumber = require('bignumber.js')
|
||||
assert.options.strict = true;
|
||||
|
||||
@@ -6,7 +6,7 @@ const setupAPI = require('./setup-api');
|
||||
const responses = require('./fixtures').responses;
|
||||
const ledgerClosed = require('./fixtures/rippled/ledger-close');
|
||||
const RippleAPI = require('ripple-api').RippleAPI;
|
||||
const schemaValidator = RippleAPI.schemaValidator;
|
||||
const schemaValidator = RippleAPI._PRIVATE.schemaValidator;
|
||||
|
||||
const TIMEOUT = process.browser ? 25000 : 10000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user