Utility Operations
resource: utility — local helpers, no network call
No network call: Both operations on this page run entirely locally — they don't hit
the Mirror Node, so they work regardless of network configuration and have no eventual-consistency
delay.
convertUnits
Converts between HBAR and tinybar. 1 HBAR = 100,000,000 tinybar.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
amount | number | ✓ Yes | — | The value to convert |
fromUnit | select | No | hbar | hbar or tinybar |
toUnit | select | No | tinybar | hbar or tinybar |
Example: convert 2.5 HBAR to tinybar —
// Request
{ "amount": 2.5, "fromUnit": "hbar", "toUnit": "tinybar" }
// Response
{ "amount": 2.5, "fromUnit": "hbar", "toUnit": "tinybar", "result": 250000000 }
validateAddress
Validates that a string is a well-formed Hedera account/entity address.
| Field | Type | Required | Description |
|---|---|---|---|
address | text | ✓ Yes | The string to validate, e.g. 0.0.98 |
// Request
{ "address": "0.0.98" }
// Response
{ "address": "0.0.98", "isValid": true }
Tip: Run
utility.validateAddress on user-entered account IDs before
passing them to account.getBalance or any other network call — it's a free, instant
guard against malformed input reaching the Mirror Node.