Abbreviate a Sui address or hex string for display.
Shortens long addresses to show only the beginning and end characters with ellipsis in the middle.
Optional
The address or hex string to abbreviate
Number of characters to show on each end (default: 5)
If true, returns the full string without abbreviation
The abbreviated string (e.g., "0x123...abc")
abbreviateAddress("0x1234567890abcdef1234567890abcdef"); // "0x123...cdef"abbreviateAddress("0x1234567890abcdef", 3); // "0x1...def"abbreviateAddress("0x1234567890abcdef", 5, true); // Full address Copy
abbreviateAddress("0x1234567890abcdef1234567890abcdef"); // "0x123...cdef"abbreviateAddress("0x1234567890abcdef", 3); // "0x1...def"abbreviateAddress("0x1234567890abcdef", 5, true); // Full address
Abbreviate a Sui address or hex string for display.
Shortens long addresses to show only the beginning and end characters with ellipsis in the middle.