UNPKG

ox

Version:

Ethereum Standard Library

142 lines 5.08 kB
export declare const arrayRegex: RegExp; export declare const bytesRegex: RegExp; export declare const integerRegex: RegExp; export declare const maxInt8: bigint; export declare const maxInt16: bigint; export declare const maxInt24: bigint; export declare const maxInt32: bigint; export declare const maxInt40: bigint; export declare const maxInt48: bigint; export declare const maxInt56: bigint; export declare const maxInt64: bigint; export declare const maxInt72: bigint; export declare const maxInt80: bigint; export declare const maxInt88: bigint; export declare const maxInt96: bigint; export declare const maxInt104: bigint; export declare const maxInt112: bigint; export declare const maxInt120: bigint; export declare const maxInt128: bigint; export declare const maxInt136: bigint; export declare const maxInt144: bigint; export declare const maxInt152: bigint; export declare const maxInt160: bigint; export declare const maxInt168: bigint; export declare const maxInt176: bigint; export declare const maxInt184: bigint; export declare const maxInt192: bigint; export declare const maxInt200: bigint; export declare const maxInt208: bigint; export declare const maxInt216: bigint; export declare const maxInt224: bigint; export declare const maxInt232: bigint; export declare const maxInt240: bigint; export declare const maxInt248: bigint; export declare const maxInt256: bigint; export declare const minInt8: bigint; export declare const minInt16: bigint; export declare const minInt24: bigint; export declare const minInt32: bigint; export declare const minInt40: bigint; export declare const minInt48: bigint; export declare const minInt56: bigint; export declare const minInt64: bigint; export declare const minInt72: bigint; export declare const minInt80: bigint; export declare const minInt88: bigint; export declare const minInt96: bigint; export declare const minInt104: bigint; export declare const minInt112: bigint; export declare const minInt120: bigint; export declare const minInt128: bigint; export declare const minInt136: bigint; export declare const minInt144: bigint; export declare const minInt152: bigint; export declare const minInt160: bigint; export declare const minInt168: bigint; export declare const minInt176: bigint; export declare const minInt184: bigint; export declare const minInt192: bigint; export declare const minInt200: bigint; export declare const minInt208: bigint; export declare const minInt216: bigint; export declare const minInt224: bigint; export declare const minInt232: bigint; export declare const minInt240: bigint; export declare const minInt248: bigint; export declare const minInt256: bigint; export declare const maxUint8: bigint; export declare const maxUint16: bigint; export declare const maxUint24: bigint; export declare const maxUint32: bigint; export declare const maxUint40: bigint; export declare const maxUint48: bigint; export declare const maxUint56: bigint; export declare const maxUint64: bigint; export declare const maxUint72: bigint; export declare const maxUint80: bigint; export declare const maxUint88: bigint; export declare const maxUint96: bigint; export declare const maxUint104: bigint; export declare const maxUint112: bigint; export declare const maxUint120: bigint; export declare const maxUint128: bigint; export declare const maxUint136: bigint; export declare const maxUint144: bigint; export declare const maxUint152: bigint; export declare const maxUint160: bigint; export declare const maxUint168: bigint; export declare const maxUint176: bigint; export declare const maxUint184: bigint; export declare const maxUint192: bigint; export declare const maxUint200: bigint; export declare const maxUint208: bigint; export declare const maxUint216: bigint; export declare const maxUint224: bigint; export declare const maxUint232: bigint; export declare const maxUint240: bigint; export declare const maxUint248: bigint; export declare const maxUint256: bigint; /** * Returns the inclusive `[min, max]` range of values representable by a Solidity * integer of the given bit width. * * @example * ```ts twoslash * import { Solidity } from 'ox' * * Solidity.intRange(8, false) * // @log: { min: 0n, max: 255n } * * Solidity.intRange(8, true) * // @log: { min: -128n, max: 127n } * ``` * * @param bits - Bit width (must be a positive multiple of 8 in `[8, 256]`). * @param signed - Whether the integer is signed. * @returns `{ min, max }` inclusive bounds. */ export declare function intRange(bits: number, signed: boolean): { min: bigint; max: bigint; }; /** * Returns the maximum value representable by an unsigned Solidity integer of the * given bit width. * * @example * ```ts twoslash * import { Solidity } from 'ox' * * Solidity.maxUint(8) * // @log: 255n * * Solidity.maxUint(256) === Solidity.maxUint256 * // @log: true * ``` * * @param bits - Bit width (must be a positive multiple of 8 in `[8, 256]`). * @returns The maximum unsigned value. */ export declare function maxUint(bits: number): bigint; //# sourceMappingURL=Solidity.d.ts.map