Skip to content

@lelantos-org/sdk / protocol / nearest

Function: nearest() ​

ts
function nearest(amount, ladder): bigint | undefined;

Defined in: @lelantos-org/sdk/dist/protocol/denominations.d.ts:46

The denomination closest to amount; ties go to the smaller.

Parameters ​

ParameterType
amountbigint
ladderLadder

Returns ​

bigint | undefined