Skip to main content

formatBalance

function formatBalance(client, balance): string

Formats a balance in a human-readable format using the Keyban client. This is typically used to display the balance of an account, as retrieved by KeybanAccount.getBalance().

Parameters

client: KeybanClient

The Keyban client to use for formatting.

balance: bigint | object

The balance as a bigint.

Returns

string

The formatted balance as a string.

See

Defined in

packages/sdk-base/src/utils/formatBalance.ts:19