Address Conversion
raw_to_userfriendly — convert a raw address (workchain:hex) to user-friendly base64 format.
| Parameter | Default | Description |
|---|---|---|
address | Required | Raw address in workchain:hex form. |
is_bounceable | False | Bounceable flag. |
is_url_safe | True | URL-safe base64 encoding. |
is_test_only | False | Test-only address flag. |
ValueError on invalid input.
Amount Conversion
to_nano — convert a human-readable amount to the smallest unit (nanotons for TON).| Parameter | Default | Description |
|---|---|---|
value | Required | Amount (number or string). |
decimals | 9 | Decimal places (9 for TON). |
Decimal.
| Parameter | Default | Description |
|---|---|---|
value | Required | Amount in smallest units. |
decimals | 9 | Decimal places (9 for TON). |
precision | Optional | Round result to N decimal places. |