UNPKG

@waku/utils

Version:
11 lines (10 loc) 491 B
import type { IEncoder, IMessage } from "@waku/interfaces"; /** * Return whether the size of the message is under the upper limit for the network. * This performs a protobuf encoding! If you have access to the fully encoded message, * use {@link isSizeUnderCapBuf} instead. * @param message * @param encoder */ export declare function isMessageSizeUnderCap(encoder: IEncoder, message: IMessage): Promise<boolean>; export declare const isWireSizeUnderCap: (buf: Uint8Array) => boolean;