@sei-js/cosmjs
Version:
TypeScript library for CosmJS interactions on the Sei blockchain
15 lines (14 loc) • 436 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.sha256 = void 0;
const sha_js_1 = require("sha.js");
/**
* Returns the sha256 encoded hash of the given data.
* @param data The data to encode.
* @returns The sha256 encoded hash of the given data.
* @category Utils
*/
const sha256 = (data) => {
return new Uint8Array(new sha_js_1.sha256().update(data).digest());
};
exports.sha256 = sha256;