ethers.js/packages/keccak256/lib/index.js

13 lines
514 B
JavaScript
Raw Normal View History

2019-05-15 01:48:48 +03:00
"use strict";
2019-06-25 04:26:48 +03:00
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
2019-05-15 01:48:48 +03:00
Object.defineProperty(exports, "__esModule", { value: true });
2021-03-08 02:24:04 +03:00
exports.keccak256 = void 0;
2019-06-25 04:26:48 +03:00
var js_sha3_1 = __importDefault(require("js-sha3"));
2019-05-15 01:48:48 +03:00
var bytes_1 = require("@ethersproject/bytes");
function keccak256(data) {
2021-10-16 09:29:27 +03:00
return '0x' + js_sha3_1.default.keccak_256((0, bytes_1.arrayify)(data));
2019-05-15 01:48:48 +03:00
}
exports.keccak256 = keccak256;
2020-07-13 15:03:56 +03:00
//# sourceMappingURL=index.js.map