mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-07 06:15:49 +00:00
* 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
20 lines
428 B
Plaintext
20 lines
428 B
Plaintext
## isValidAddress
|
|
|
|
`isValidAddress(address: string): boolean`
|
|
|
|
Checks if the specified string contains a valid address. X-addresses are considered valid with ripple-lib v1.4.0 and higher.
|
|
|
|
### Parameters
|
|
|
|
This method takes one parameter, the address to validate.
|
|
|
|
### Return Value
|
|
|
|
This method returns `true` if the address is valid and `false` if it is not.
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
return api.isValidAddress("address")
|
|
```
|