num_convert
Convert a big integer between hexadecimal, decimal, binary, and octal bases with arbitrary precision and optional byte padding.
Instructions
Convert a big-integer between bases (hex/dec/bin/oct).
Parses value as a from_base integer (a leading 0x/0b/0o and a - sign
are accepted) and renders it in to_base, prefixed for non-decimal output.
pad_bytes zero-fills the output to that byte width (a minimum, never
truncating); it is bit-aligned, so it is rejected for decimal output.
Arbitrary precision — a 32-byte RPC value converts losslessly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| from_base | Yes | ||
| to_base | Yes | ||
| pad_bytes | No |