diff --git a/CHANGELOG.md b/CHANGELOG.md index cf45c54830..1883dc6514 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Breaking**: Removed `equalByteArrays`, use `uint8arrays/equals` instead. See changes in `eth-pm` example. +- **Breaking**: Removed deprecated utils functions. ## [0.19.2] - 2022-03-21 diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 6c3a1c1540..1ab66670cd 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,18 +1,5 @@ import { keccak256, Message } from "js-sha3"; -/** - * Convert input to a Buffer. - * - * @deprecated Use `hexToBytes` instead. - */ -export function hexToBuf(hex: string | Buffer | Uint8Array): Buffer { - if (typeof hex === "string") { - return Buffer.from(hex.replace(/^0x/i, ""), "hex"); - } else { - return Buffer.from(hex); - } -} - /** * Convert input to a byte array. */ @@ -28,16 +15,6 @@ export function hexToBytes(hex: string | Uint8Array): Uint8Array { return hex; } -/** - * Convert input to hex string (no `0x` prefix). - * - * @deprecated Use `bytesToHex` instead. - */ -export function bufToHex(buf: Uint8Array | Buffer | ArrayBuffer): string { - const _buf = Buffer.from(buf); - return _buf.toString("hex"); -} - /** * Convert byte array to hex string (no `0x` prefix). */