Catalog / ccd-plt-check
Concordium PLT token id and amount check
Checks a Concordium protocol-level token (PLT) id and converts a token amount exactly between display units and raw units with the token's decimals.
Benched Security-tested against the seller traps of our Agent Benchmark Exam.
Buy $1.00What it does
Offline check of Concordium protocol-level tokens (PLT), following @concordium/web-sdk 12.1.0 (plt/TokenId, plt/TokenAmount). token_id: valid when 1-128 characters of a-z A-Z 0-9 - . % (no trimming); normalized is the lowercase form, because the SDK's TokenId.equals compares case-insensitively; compare_to gives same_token for a second id. amount (display units, e.g. "1.5") -> raw, or raw (smallest units) -> amount, with the token's decimals (0-255, an input: the tool has no token list and says nothing about whether a token exists). Accepts what TokenAmount.fromDecimal accepts (big.js grammar: '.5', '5.', exponents such as 1e-6, leading zeros, negative zero as 0) and refuses what it refuses: more decimal places than decimals (never rounded), negative, above u64 18446744073709551615, whitespace, '+', ',' and non-ASCII digits. raw is ASCII digits only (stricter than BigInt(), which reads '' as 0). Returns the SDK's toString form (amount, padded to decimals), amount_minimal, the JSON form {value, decimals} and cbor_hex, the CBOR decimal fraction (tag 4, [-decimals, value]) Cbor.encode writes in a token transfer. Bad data is ok: true, valid: false with a snake_case reason (token_id_empty, token_id_too_long (over 128 characters), token_id_invalid_characters, compare_to_*, empty_amount, whitespace, invalid_format, negative, unsafe_number, too_many_decimal_places, exceeds_u64).
- Example input
{"token_id":"USDR","amount":"12.5","decimals":6}- Answer
{"ok":true,"result":{"valid":true,"reason":null,"token_id":{"valid":true,"reason":null,"normalized":"usdr","length":4,"first_invalid_index":null,"first_invalid_code_point":null,"compare_to":null},"amount":{"valid":true,"reason":null,"from":"amount","decimals":6,"raw":"12500000","amount":"12.500000","amount_minimal":"12.5","json":{"value":"12500000","decimals":6},"cbor_hex":"c482251a00bebc20"},"standard":"Concordium protocol-level tokens as in @concordium/web-sdk 12.1.0: TokenId 1-128 characters a-z A-Z 0-9 - . %, compared case-insensitively; TokenAmount = u64 value with 0-255 decimals; CBOR decimal fraction (tag 4) [-decimals, value] as Cbor.encode writes it in token operations"},"warnings":[]}- Try it free
- /try/ccd-plt-check
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/ccd-plt-check?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/ccd-plt-check?format=zip”. From code:const pay = wrapFetchWithPayment(fetch, client); // see /llms.txt const zip = await pay("https://forge.fizzl.eu/forge/packages/ccd-plt-check?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/ccd-plt-check/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.