"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateAddress = void 0;
const address_1 = require("@polkadot/util-crypto/address");
const validateAddress = ({ address, message, ss58Format, }) => {
    try {
        const [isValid] = (0, address_1.checkAddress)(address, ss58Format || 42);
        return isValid || message;
    }
    catch (error) {
        return message;
    }
};
exports.validateAddress = validateAddress;
//# sourceMappingURL=validations.js.map