import type BigIntWrapper from '@exodus/bigint'; import type NumberUnit from './number-unit.js'; import type UnitType from './unit-type.js'; export interface BNLike { constructor: { wordSize: number; }; words: number[]; toString(): string; } export type NumberLike = string | number | bigint | BigIntWrapper | BNLike; export interface Unit { (val: NumberLike | NumberUnit): NumberUnit; unitName: string; power: number; multiplier: BigIntWrapper; unitType: UnitType; toJSON(): { unitName: string; power: number; }; toString(): string; } export type Definitions = Record; export type UnitMap = Record; export type ConversionUnitFn = (numberUnit: NumberUnit) => NumberUnit; export interface ConversionUnitObject { from: Unit | NumberUnit; to: Unit | NumberUnit; fromValue: string | number; toValue: string | number; fromUnit?: string; toUnit?: string; } export type NumberFraction = { number: string; fraction: string; fractionLength: number; };