Remove usage of `Buffer` from version_1.ts

This commit is contained in:
Franck Royer 2022-05-20 10:29:49 +10:00
parent 89de2e3c77
commit dbdf37a31d
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 1 additions and 3 deletions

View File

@ -1,5 +1,3 @@
import { Buffer } from "buffer";
import * as secp from "@noble/secp256k1"; import * as secp from "@noble/secp256k1";
import { keccak256 } from "js-sha3"; import { keccak256 } from "js-sha3";
import { concat } from "uint8arrays/concat"; import { concat } from "uint8arrays/concat";
@ -85,7 +83,7 @@ export async function clearEncode(
* @internal * @internal
*/ */
export function clearDecode( export function clearDecode(
message: Uint8Array | Buffer message: Uint8Array
): { payload: Uint8Array; sig?: Signature } | undefined { ): { payload: Uint8Array; sig?: Signature } | undefined {
const sizeOfPayloadSizeField = getSizeOfPayloadSizeField(message); const sizeOfPayloadSizeField = getSizeOfPayloadSizeField(message);
if (sizeOfPayloadSizeField === 0) return; if (sizeOfPayloadSizeField === 0) return;