@orangecheck/design / shortenAddress
Function: shortenAddress()
function shortenAddress(
value: string,
head?: number,
tail?: number): string;
Defined in: format/index.ts:97
Truncate a Bitcoin/Lightning address (or any long id) for display: "bc1qxy…wxyz". Defaults match the family's most common rule (8 head / 4 tail).
Parameters
| Parameter | Type | Default value |
|---|---|---|
value | string | undefined |
head | number | 8 |
tail | number | 4 |
Returns
string