Skip to content

toPicoWay

toPicoWay(input, unit): BN

Converts the given [[BalanceNumber]] to the pico WAY equivalent.

input: Exclude<AnyNumber, Uint8Array>

[[BalanceNumber]] to convert.

unit: MetricPrefix= 'WAY'

Metric prefix of the given [[BalanceNumber]].

BN

Exact BN representation in picoWay, to use in transactions and calculations.

Unknown metricPrefix, or if the input has too many decimal places for it’s unit.

utils/src/Balance.ts:97