UNPKG

@morpho-org/midnight-sdk

Version:

Viem-based package for Morpho Midnight that exports protocol utilities, fetch helpers, and Midnight API utilities under a dedicated API subpath.

7 lines (6 loc) • 445 B
/** @internal Reads a tree item at a required index, rejecting missing entries. */ export declare function requireTreeItem<T>(items: readonly T[], index: number): T; /** @internal Returns whether `value` is a positive power of two. */ export declare function isPowerOfTwo(value: number): boolean; /** @internal Returns the smallest power of two greater than or equal to `value`. */ export declare function nextPowerOfTwo(value: number): number;