Compute a 32-byte Keccak-256 hash.
Used for Ethereum-compatible operations (address derivation, EVM function selectors) and supported by the Bulletin Chain for cross-chain compatibility.
Arbitrary bytes to hash.
32-byte Keccak-256 digest.
import { keccak256, bytesToHex } from "@polkadot-apps/utils";const hash = keccak256(new TextEncoder().encode("hello"));console.log(bytesToHex(hash)); // 64-char hex string Copy
import { keccak256, bytesToHex } from "@polkadot-apps/utils";const hash = keccak256(new TextEncoder().encode("hello"));console.log(bytesToHex(hash)); // 64-char hex string
Compute a 32-byte Keccak-256 hash.
Used for Ethereum-compatible operations (address derivation, EVM function selectors) and supported by the Bulletin Chain for cross-chain compatibility.