"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isHash = exports.sha256d = exports.sha256 = void 0;
const scryptlib_1 = require("scryptlib");
function sha256(x) {
    return scryptlib_1.bsv.crypto.Hash.sha256(Buffer.from(x, "hex")).toString("hex");
}
exports.sha256 = sha256;
function sha256d(x) {
    return sha256(sha256(x));
}
exports.sha256d = sha256d;
function isHash(s) {
    return s.length === 64 && /^[A-F0-9]+$/i.test(s);
}
exports.isHash = isHash;
//# sourceMappingURL=sha.js.map