UNPKG

@nemoprotocol/points-sdk

Version:
22 lines 1.02 kB
import { default as Decimal } from 'decimal.js'; /** * Checks if a string amount is valid (not empty, not "0", and is a valid number) * @param amount The amount string to check * @returns boolean indicating if the amount is valid */ export declare const isValidAmount: (amount?: string | number | Decimal | null) => boolean; type DivideReturnType<T> = T extends "string" ? string : T extends "number" ? number : Decimal; /** * Safe division function that handles decimal operations */ export declare const safeDivide: <T extends "string" | "number" | "decimal">(numerator?: string | number | Decimal, denominator?: string | number | Decimal, returnType?: T) => DivideReturnType<T>; /** * Split SY amount into PT and SY components */ export declare function splitSyAmount(syAmount: string, _lpSupply: string, _totalSy: string, _totalPt: string, exchangeRate: string, priceVoucher: string): { syForPtValue: string; syValue: string; ptValue: string; }; export {}; //# sourceMappingURL=index.d.ts.map