Skip to content

balanceNumberToString

balanceNumberToString(input): string

Safely converts the given [[BalanceNumber]] to a string, using the supplied methods, or it given a string checks for valid number representation.

Parameters

input: Exclude<AnyNumber, Uint8Array>

[[BalanceNumber]] to convert.

Returns

string

String representation of the given [[BalanceNumber]].

Throws

On invalid number representation if given a string.

Throws

On malformed input.

Source

utils/src/Balance.ts:72