Skip to content

@lelantos-org/sdk / index / nearestDenomination

Function: nearestDenomination() ​

ts
function nearestDenomination(amount, asset): CircuitAmount | undefined;

Defined in: @lelantos-org/sdk/dist/wallet/assets/amounts.d.ts:18

The denomination closest to amount, or undefined when the asset has no ladder. Ties go to the smaller, so a suggestion never exceeds the request.

Parameters ​

ParameterType
amountCircuitAmountLike
assetAssetInfo

Returns ​

CircuitAmount | undefined