Add support for the X-address format (#1041)

* Update schema-validator

* Update to ripple-address-codec 4.0.0

* Update ./src/common/hashes/index.ts

* Add generateXAddress method

* Deprecate generateAddress method

* Add unit tests

* Add documentation
This commit is contained in:
Elliot Lee
2019-10-23 12:03:59 -07:00
committed by GitHub
parent 3a20123e0f
commit e1964ac5ed
40 changed files with 4704 additions and 111 deletions

View File

@@ -1,4 +1,4 @@
import {validate, removeUndefined, dropsToXrp} from '../common'
import {validate, removeUndefined, dropsToXrp, ensureClassicAddress} from '../common'
import {RippleAPI} from '..'
import {AccountInfoResponse} from '../common/types/commands/account_info'
@@ -34,6 +34,11 @@ export default async function getAccountInfo(
): Promise<FormattedGetAccountInfoResponse> {
// 1. Validate
validate.getAccountInfo({address, options})
// Only support retrieving account info without a tag,
// since account info is not distinguished by tag.
address = ensureClassicAddress(address)
// 2. Make Request
const response = await this.request('account_info', {
account: address,