UNPKG

@roochnetwork/rooch-sdk

Version:
18 lines (17 loc) 512 B
import { blake2b } from "@noble/hashes/blake2b"; import { ripemd160 } from "@noble/hashes/ripemd160"; import { sha3_256 } from "@noble/hashes/sha3"; import { sha256 } from "@noble/hashes/sha256"; import { sha512 } from "@noble/hashes/sha512"; import { concatBytes } from "./bytes.js"; const hash160 = (msg) => ripemd160(sha256(msg)); const sha256x2 = (...msgs) => sha256(sha256(concatBytes(...msgs))); export { blake2b, hash160, sha256, sha256x2, sha3_256, sha512 }; //# sourceMappingURL=hash.js.map