UNPKG

@etherna/sdk-js

Version:

Etherna SDKs for operations on the network

29 lines 1.06 kB
import type { Data } from "../types"; /** * Function that verifies if passed data are Bytes and if the array has "length" number of bytes under given offset. * @param data * @param offset * @param length */ export declare function hasBytesAtOffset(data: unknown, offset: number, length: number): boolean; /** * Returns a new byte array filled with zeroes with the specified length * * @param length The length of data to be returned */ export declare function makeBytes(length: number): Uint8Array; /** * Helper function for serialize byte arrays * * @param arrays Any number of byte array arguments */ export declare function serializeBytes(...arrays: Uint8Array[]): Uint8Array; export declare function wrapBytesWithHelpers<T extends Record<string, unknown> = Record<string, unknown>>(data: Uint8Array): Data; /** * Returns true if two byte arrays are equal * * @param a Byte array to compare * @param b Byte array to compare */ export declare function bytesEqual(a: Uint8Array, b: Uint8Array): boolean; //# sourceMappingURL=bytes.d.ts.map