Catalog / algo-amount-convert
Algorand amount converter (ALGO and ASA)
Converts Algorand amounts exactly: ALGO to microAlgos and back, and asset (ASA) amounts between display units and base units, without rounding.
Benched Security-tested against the seller traps of our Agent Benchmark Exam.
Buy $1.00What it does
Exact Algorand amount conversion with BigInt string math (no floats), over the full uint64 range. algo_to_micro / micro_to_algo: 1 ALGO = 1000000 microAlgos. asa_to_base / base_to_asa: Algorand Standard Asset amount in display units <-> uint64 base units using the asset's decimals (0-19). Amounts are decimal strings (JSON numbers only as non-negative safe integers); only surrounding ASCII whitespace (space, tab, CR, LF) is trimmed, anything else is refused; results are strings. Bad amounts come back ok: true, valid: false with a machine-readable reason (negative, exponent_notation, comma_not_allowed, too_many_fraction_digits, overflow_uint64, ...). fits_js_safe_integer says whether the base amount survives a JavaScript number (algosdk microalgosToAlgos refuses above 2^53-1).
- Example input
{"operation":"micro_to_algo","amount":"1234567"}- Answer
{"ok":true,"result":{"valid":true,"reason":null,"operation":"micro_to_algo","standard":"Algorand: 1 ALGO = 1000000 microAlgos; a transaction amount is a uint64 of microAlgos (max 18446744073709551615)","decimals":6,"base_units":"1234567","display_amount":"1.234567","display_amount_fixed":"1.234567","base_unit_name":"microAlgos","display_unit_name":"ALGO","fits_js_safe_integer":true},"warnings":[]}- Try it free
- /try/algo-amount-convert
Buy
Price $1.00, once. One buyer only: the first one owns the tool, we stop selling it and list your copy, and every paid call to it goes to your wallet. Comes with a licence: run it, change it and earn from it; the code itself is not passed on or resold.
- Pay with an x402 walletThe buy link is
https://forge.fizzl.eu/forge/packages/algo-amount-convert?format=zip. It answers with a payment request (HTTP 402) that an x402 wallet pays in USDC on Base. From Claude, ChatGPT or Grok with the Fizzl Agent Wallet: ask “buy https://forge.fizzl.eu/forge/packages/algo-amount-convert?format=zip”. From code:const pay = wrapFetchWithPayment(fetch, client); // see /llms.txt const zip = await pay("https://forge.fizzl.eu/forge/packages/algo-amount-convert?format=zip"); - Start it with your walletUnzip,
npm install, thenPAY_TO=0xYourWallet PUBLIC_URL=https://your-host npm starton any Node host. - We list it for youYour copy tells us where it runs; we check it and add it to the x402 Trust Index and the Bazaar under your wallet.
Bought it, and something is wrong?
Paste the receipt you got with the purchase (the X-Forge-Receipt token; a bundle receipt works too) and say what is wrong. Free. We pick it up within the hour; a real fault is fixed, passes the same checks, and you download the new version free at /forge/packages/algo-amount-convert/update with your receipt. No money back through this form.
Missing a tool?
Tell us in one sentence what it should do: what goes in, what comes out. Free, no wallet. Our agents read every suggestion and build the useful ones in the next shift. Want it for sure? Order it for $1.