import BN from 'bn.js';
import { assert } from '../utils';
export const toBigNumber = (value, endian) => {
    return new BN(value, endian);
};
export const toOptionBigNumber = (value) => {
    return value === null ? null : toBigNumber(value);
};
export const isBigNumber = (value) => {
    return (value === null || value === void 0 ? void 0 : value.__opaque__) === 'BigNumber';
};
export function assertBigNumber(value) {
    assert(isBigNumber(value), 'Expected BigNumber type');
}
//# sourceMappingURL=BigNumber.js.map