UNPKG

multichain-address-validator

Version:

Multichain address validator for Bitcoin and other blockchains.

9 lines (8 loc) 251 B
import { getAddress } from '../helpers.js'; export default { isValidAddress(address) { // Regex to validate the format "shard.realm.account" const regex = /^\d+\.\d+\.\d+$/; return regex.test(getAddress(address)); } };