You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
454 B

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.scriptSha1 = exports.defineScript = void 0;
const crypto_1 = require("crypto");
function defineScript(script) {
return {
...script,
SHA1: scriptSha1(script.SCRIPT)
};
}
exports.defineScript = defineScript;
function scriptSha1(script) {
return (0, crypto_1.createHash)('sha1').update(script).digest('hex');
}
exports.scriptSha1 = scriptSha1;