Utility functions¶
Koilib exports helpers for units, encodings, hashes, addresses, and bundled standard ABIs.
export function formatKoin(amount) {
return utils.formatUnits(amount, 8);
}
View complete file · Run example
formatUnits converts an integer amount in the token's smallest unit into a
human-readable decimal string without changing blockchain state.