"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertToBigInt = exports.convertToUnit = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));
bignumber_js_1.default.config({
    FORMAT: {
        decimalSeparator: ".",
        groupSize: 0,
        groupSeparator: "",
        secondaryGroupSize: 0,
        fractionGroupSeparator: "",
        fractionGroupSize: 0,
    },
    ROUNDING_MODE: bignumber_js_1.default.ROUND_DOWN,
    EXPONENTIAL_AT: 1e9,
});
const convertToUnit = (amount, decimals) => {
    return new bignumber_js_1.default(amount).times(new bignumber_js_1.default(10).pow(decimals)).toString();
};
exports.convertToUnit = convertToUnit;
const convertToBigInt = (amount, decimals) => {
    return BigInt((0, exports.convertToUnit)(amount, decimals));
};
exports.convertToBigInt = convertToBigInt;
