@somnia-chain/markets-sdk / index / fromHuman
Function: fromHuman()
fromHuman(
human,decimals?):bigint
Defined in: units.ts:28
Human amount (number or decimal string) → raw bigint at decimals, for the
write API (placeOrder price/quantity, mintSet amount, …). Accepts a string
to avoid float rounding (fromHuman("0.1")), or a number for convenience.
Parameters
human
string | number
decimals?
number = DECIMALS
Returns
bigint