mirror of https://github.com/waku-org/js-waku.git
Remove usage of `Buffer` from version_1.ts
This commit is contained in:
parent
89de2e3c77
commit
dbdf37a31d
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue